55import java .util .List ;
66
77import game .Game ;
8- import game .mode .model .Model ;
98import main .FastArrayList ;
109import mcts .ExampleUCT ;
1110import player .GameLoader ;
1413import util .Context ;
1514import util .Move ;
1615import util .Trial ;
17- import util .state .StateType ;
16+ import util .model .Model ;
17+ import util .state .GameType ;
1818import util .state .containerState .ContainerState ;
1919
2020/**
@@ -42,14 +42,14 @@ public static void main(final String[] args)
4242 final int stateFlags = game .stateFlags ();
4343
4444 // for example, we may like to know whether our game has stochastic elements
45- final boolean isStochastic = ((stateFlags & StateType .Stochastic ) != 0 );
45+ final boolean isStochastic = ((stateFlags & GameType .Stochastic ) != 0 );
4646 if (isStochastic )
4747 System .out .println (game .name () + " is stochastic." );
4848 else
4949 System .out .println (game .name () + " is not stochastic." );
5050
5151 // figure out how many players are expected to play this game
52- final int numPlayers = game .mode ().numPlayers ();
52+ final int numPlayers = game .players ().count ();
5353 System .out .println (game .name () + " is a " + numPlayers + "-player game." );
5454
5555 // to be able to play the game, we need to instantiate "Trial" and "Context" objects
@@ -66,7 +66,7 @@ public static void main(final String[] args)
6666 // for every container state we find (often just 1), we'll print a few things:
6767
6868 // print the collection of locations that are empty
69- System .out .println ("Empty locations = " + containerState .empty (). bitSet ());
69+ System .out .println ("Empty locations = " + containerState .emptyChunkSet ());
7070
7171 // for every location that is owned by a player, print the owner
7272 System .out .println ("Who = " + containerState .cloneWho ().toChunkString ());
@@ -88,7 +88,7 @@ public static void main(final String[] args)
8888 // let's print our empty/who/what again, see how they have changed
8989 for (final ContainerState containerState : trial .state ().containerStates ())
9090 {
91- System .out .println ("Empty locations = " + containerState .empty (). bitSet ());
91+ System .out .println ("Empty locations = " + containerState .emptyChunkSet ());
9292 System .out .println ("Who = " + containerState .cloneWho ().toChunkString ());
9393 System .out .println ("What = " + containerState .cloneWhat ().toChunkString ());
9494 }
@@ -102,7 +102,7 @@ public static void main(final String[] args)
102102 // let's have a final look at how our state looks after this second move
103103 for (final ContainerState containerState : trial .state ().containerStates ())
104104 {
105- System .out .println ("Empty locations = " + containerState .empty (). bitSet ());
105+ System .out .println ("Empty locations = " + containerState .emptyChunkSet ());
106106 System .out .println ("Who = " + containerState .cloneWho ().toChunkString ());
107107 System .out .println ("What = " + containerState .cloneWhat ().toChunkString ());
108108 }
0 commit comments