ToFlatFormatString() public méthode

public ToFlatFormatString ( ) : String
Résultat String
Exemple #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();
        }
Exemple #2
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);
        }
 public static bool IsOutOfPills(Maze maze)
 {
     var flatFormatMaze = maze.ToFlatFormatString();
     return !(flatFormatMaze.Contains(Symbols.SYMBOL_PILL) || flatFormatMaze.Contains(Symbols.SYMBOL_BONUS_PILL));
 }
 public static bool IsOutOfPills(Maze maze)
 {
     var flatFormatMaze = maze.ToFlatFormatString();
     return !(flatFormatMaze.Contains(Properties.Settings.Default.SymbolPill) || flatFormatMaze.Contains(Properties.Settings.Default.SymbolPowerPill));
 }
 private void CreateIterationStateFile(String folderPath)
 {
     var replayFile =
         new StreamWriter(folderPath + "\\" + Properties.Settings.Default.SettingReplayFolder + "\\iteration" +
                          _iteration + Properties.Settings.Default.SettingStateFileExtension);
     var mazeForFile = new Maze(_maze);
     if (_secondMazePlayer == _currentPlayer.GetSymbol())
         mazeForFile.SwapPlayerSymbols();
     replayFile.Write(mazeForFile.ToFlatFormatString());
     replayFile.Close();
 }
 private Maze 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 (((_currentPlayer == null) || (_secondMazePlayer == _currentPlayer.GetSymbol())) && (_iteration > 0))
         mazeForFile.SwapPlayerSymbols();
     replayFile.Write(mazeForFile.ToFlatFormatString());
     replayFile.Close();
     return mazeForFile;
 }