* doc/org/tut40.org: Clarify, as suggested by a CAV'22 reviewer.

This commit is contained in:
Alexandre Duret-Lutz 2022-03-25 09:25:04 +01:00
parent 7abcf4e38b
commit 46f3f5aaf4

View file

@ -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: