* doc/org/tut40.org: Clarify, as suggested by a CAV'22 reviewer.
This commit is contained in:
parent
d1f49c721a
commit
58f39ec287
1 changed files with 6 additions and 4 deletions
|
|
@ -144,9 +144,11 @@ states.
|
|||
|
||||
We now look at how to create such a game in Python.
|
||||
|
||||
Essentially, a game in Spot is just an automaton equiped with a
|
||||
special property to indicate the owner of each states. So it can be
|
||||
created using the usual interface:
|
||||
Essentially, a game in Spot is just an automaton equiped with a [[file:concepts.org::#named-properties][named
|
||||
property "state-player"]] that hold a Boolean vector indicating the
|
||||
owner of each state. The game can be created using the usual
|
||||
automaton interface, and the owners are set by calling
|
||||
=game.set_state_players()= with a vector of Boolean at the very end.
|
||||
|
||||
#+NAME: build_game
|
||||
#+BEGIN_SRC python :exports code
|
||||
|
|
@ -173,7 +175,7 @@ created using the usual interface:
|
|||
todo = []
|
||||
|
||||
# Create the state (i, j) for a player if it does not exist yet and
|
||||
# returns the state's number in the game.
|
||||
# return the state's number in the game.
|
||||
def get_game_state(player, i, j):
|
||||
orig_state = s_orig_states if player else d_orig_states
|
||||
if (i, j) in orig_state:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue