コード例 #1
0
 public Game(Player playerA, Player playerB, String pathToInitialMaze)
 {
     _playerPool       = new PlayerPool(playerA, playerB);
     _maze             = new Maze(pathToInitialMaze);
     _gameMarshaller   = new GameMarshaller();
     _iteration        = 0;
     _secondMazePlayer = 'A';
 }
コード例 #2
0
 public Game(Player playerA, Player playerB, String pathToInitialMaze)
 {
     _playerPool = new PlayerPool(playerA, playerB);
     _maze = new Maze(pathToInitialMaze);
     _gameMarshaller = new GameMarshaller();
     _iteration = 1;
     _secondMazePlayer = 'A';
 }
コード例 #3
0
 public static Player DetermineWinner(PlayerPool playerPool, Enums.GameOutcome gameOutcome)
 {
     if (playerPool.GetPlayers()[0].GetScore() != playerPool.GetPlayers()[1].GetScore())
         return playerPool.GetPlayers().OrderByDescending(x => x.GetScore()).First();
     if (gameOutcome == Enums.GameOutcome.NoScoringMaxed)
         return playerPool.GetNextPlayer();
     return null;
 }
コード例 #4
0
 public static Player DetermineWinner(PlayerPool playerPool)
 {
     if (playerPool.GetPlayers()[0].GetScore() != playerPool.GetPlayers()[1].GetScore())
         return playerPool.GetPlayers().OrderByDescending(x => x.GetScore()).First();
     return null;
 }