boardgamers / gaia-engine

Javascript engine for project gaia
MIT License
13 stars 6 forks source link

Ivits are not prompted for a federation #152

Closed rzulian closed 6 years ago

rzulian commented 6 years ago

Ivits have the possibility to form a federation here:

init 4 green-jeans-8458
p1 faction ivits
p2 faction xenos
p3 faction ambas
p4 faction itars
xenos build m 2x-3
ambas build m -2x3
itars build m 2x0
itars build m -1x-4
ambas build m -3x-2
xenos build m 1x3
xenos build m -1x-5
ivits build PI -2x4
itars booster booster4
ambas booster booster3
xenos booster booster5
ivits booster booster9
ivits income 1t
ivits spend 1pw for 1c. special space-station. build sp -3x5.
xenos build ts -1x-5.
itars charge 1pw
ambas build ts -3x-2.
itars charge 1pw
itars build ts -1x-4.
xenos charge 2pw
ambas charge 2pw
ivits build m -4x5.
ambas charge 1pw
xenos burn 1. action power6. build m 3x-4.
ambas build lab -3x-2. tech free1. up nav.
itars charge 2pw
itars build lab -1x-4. tech free1. up terra.
xenos charge 2pw
ambas charge 2pw
ivits action power3.
xenos build m 1x-1.
itars charge 1pw
ambas action qic1. tech free2. up terra.
itars build ts 2x0.
xenos charge 1pw
ivits build m -3x6.
xenos up int.
ambas build ac1 -3x-2. tech nav. up nav.
itars charge 2pw
itars burn 2. action power4.
ivits build ts -4x5.
xenos build lab -1x-5. tech free1. up int.
itars decline 2pw
ambas spend 1pw for 1c. up nav.
itars special step. build m 2x1.
xenos charge 1pw

because the code at player . 733 is not checking for fed.satellites <= maxSatellites after those moves

ivits build lab -4x5. tech eco. up eco.
ambas charge 1pw
xenos action power5.
ambas spend 3pw for 1o. build m -2x0.
itars spend 1q for 1o. build PI 2x0.
xenos charge 1pw

form a federation is not available because player.674 is checking for fed.satellites <= maxSatellites

this is the object

screen shot 2018-09-24 at 17 06 10

what is strange that is counting one satellite for the space station

coyotte508 commented 6 years ago

In a local engine / viewer it works

rzulian commented 6 years ago

It doesn't work locally. Only after first ts, but not after you build the lab. there is only one federation where fed.satellites <= maxSatellites is not true, so no available federations.

rzulian commented 6 years ago

Am I doing something wrong?

screen shot 2018-09-24 at 20 49 53
coyotte508 commented 6 years ago

My bad, because the logs both end with 'xenos charge 1pw' I thought the second part was just the end of the first part. I'm getting the error too!

rzulian commented 6 years ago

I had to redo the tests several times because the log is confusing ;) I think problem is on the federationCache algorithm for Ivits. I can have a look at it, just for fun.

coyotte508 commented 6 years ago

Ok. I'm already looking.

coyotte508 commented 6 years ago

Nice catch with the satellites :)