The code is so much nicer to write, and in general shorter and more straightforward. A clear win.
I have explicitly declared the next_move variable even within the most trivial move functions, so that it is clear that the function now returns a tuple with two elements, the first is a move and the second the new state object.
I adapted the documentation too. It reads also more easily.
Note that changes to setup_test_game in pelita are also required for this to work (see the test_demoX.py files).
In the documentation I say that doing print(bot) wil print the state of the game. I think this should include the layout string and all other relevant info, for example score, round, etc...
Implementation of the third alternative for a new
state
object and removal of theGame
object and theTeam
list from: https://github.com/ASPP/pelita/issues/529The code is so much nicer to write, and in general shorter and more straightforward. A clear win.
I have explicitly declared the
next_move
variable even within the most trivialmove
functions, so that it is clear that the function now returns a tuple with two elements, the first is a move and the second the newstate
object.I adapted the documentation too. It reads also more easily.
Note that changes to
setup_test_game
in pelita are also required for this to work (see thetest_demoX.py
files).In the documentation I say that doing
print(bot)
wil print the state of the game. I think this should include the layout string and all other relevant info, for examplescore
,round
, etc...