prismofeverything / organism-legacy

implementation of the organism board game
Eclipse Public License 1.0
1 stars 0 forks source link

OrganismTree returns "double" eats from spaces with just one food #7

Open ggsun opened 4 years ago

ggsun commented 4 years ago
Screen Shot 2019-12-16 at 11 49 14 PM

Given the above state, OrganismTree returns move ('EAT', ('EAT', ('green', 1), ('green', 0)), ('EAT', ('green', 1), ('green', 0))), which is illegal since space ('green', 0) only has one food. It also returns ('EAT', ('EAT', ('orange', 2), ('green', 4)), ('EAT', ('orange', 2), ('green', 4))).

prismofeverything commented 4 years ago

Hey @ggsun, just fixed that with this commit: https://github.com/prismofeverything/organism/commit/e81ab289bea5e71de64ef5f69a854c7ddcac5699

(also added a test for it). The order for spaces for moving food was reversed. Good catch!