GetSymbol() 공개 메소드

public GetSymbol ( ) : char
리턴 char
예제 #1
0
        private void CreateIterationStateFile(String folderPath)
        {
            var replayFile =
                new StreamWriter(folderPath + System.IO.Path.DirectorySeparatorChar + Properties.Settings.Default.SettingReplayFolder + System.IO.Path.DirectorySeparatorChar + "iteration" +
                                 _iteration + Properties.Settings.Default.SettingStateFileExtension);
            var mazeForFile = new Maze(_maze);

            if (_secondMazePlayer == _currentPlayer.GetSymbol())
            {
                mazeForFile.SwapPlayerSymbols();
            }
            replayFile.Write(mazeForFile.ToFlatFormatString());
            replayFile.Close();
        }
예제 #2
0
 private void CreateMatchInfo(Enums.GameOutcome gameOutcome, Player winner, StreamWriter file)
 {
     foreach (var player in _playerPool.GetPlayers())
     {
         file.WriteLine("PLAYER:" + player.GetSymbol() + "," + player.GetPlayerName() + "," + player.GetScore());
     }
     if (winner == null)
     {
         file.WriteLine("GAME: DRAW," + gameOutcome + "," + _iteration);
     }
     else
     {
         file.WriteLine("GAME: " + winner.GetSymbol() + "," + gameOutcome + "," + _iteration);
     }
 }
예제 #3
0
        private Maze CreateIterationStateFile(String folderPath)
        {
            var replayFile =
                new StreamWriter(Path.Combine(folderPath, Properties.Settings.Default.SettingReplayFolder, "iteration" +
                                              _iteration + Properties.Settings.Default.SettingStateFileExtension));
            var mazeForFile = new Maze(_maze);

            if ((_currentPlayer != null) && (_secondMazePlayer == _currentPlayer.GetSymbol()))
            {
                mazeForFile.SwapPlayerSymbols();
            }
            replayFile.Write(mazeForFile.ToFlatFormatString());
            replayFile.Close();
            return(mazeForFile);
        }
 private void CreateMatchInfo(Enums.GameOutcome gameOutcome, Player winner, StreamWriter file)
 {
     foreach (var player in _playerPool.GetPlayers())
     {
         file.WriteLine("PLAYER:" + player.GetSymbol() + "," + player.GetPlayerName() + "," + player.GetScore());
     }
     if (winner == null)
         file.WriteLine("GAME: DRAW," + gameOutcome + "," + _iteration);
     else
         file.WriteLine("GAME: " + winner.GetSymbol() + "," + gameOutcome + "," + _iteration);
 }