Example #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';
 }
 public Game(Player playerA, Player playerB, String pathToInitialMaze)
 {
     _playerPool = new PlayerPool(playerA, playerB);
     _maze = new Maze(pathToInitialMaze);
     _gameMarshaller = new GameMarshaller();
     _iteration = 1;
     _secondMazePlayer = 'A';
 }
 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;
 }
 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;
 }