Beispiel #1
0
 public void Build(int users)
 {
     Debug.Assert(new ClosedInterval(0, game.GetNumPlayers()).Includes(users));
     LocalCoordinateController[,] coordinateController = new LocalCoordinateController[2, 2];
     for (int i = 0; i < game.GetNumPlayers(); i++)
     {
         for (int j = 0; j < 2; j++)
         {
             if (i < users)
             {
                 coordinateController[i, j] = new LocalUserCoordinateController(
                     game);
             }
             else
             {
                 coordinateController[i, j] = new LocalRandomCoordinateController(
                     game);
             }
         }
     }
     for (int i = 0; i < game.GetNumPlayers(); i++)
     {
         for (int j = 0; j < 2; j++)
         {
             if (j == 0)
             {
                 colocateControllerArray[i, j] = new LocalPutController(game,
                                                                        coordinateController[i, j]);
             }
             else
             {
                 colocateControllerArray[i, j] = new LocalMoveController(game,
                                                                         coordinateController[i, j]);
             }
         }
     }
 }
Beispiel #2
0
 public LocalPutController(Game game, LocalCoordinateController coordinateController) : base(game, coordinateController)
 {
 }
Beispiel #3
0
 protected LocalColocateController(Game game, LocalCoordinateController coordinateController) : base(game)
 {
     Debug.Assert(coordinateController != null);
     this.coordinateController = coordinateController;
 }