/// <summary>
        /// Serializes and saves the current state of the supplied board to a .bin file
        /// </summary>
        /// <param name="board"></param>
        public void SaveGame(Board board)
        {
            Stream testFileStream = File.Create("SavedBoard.bin");
            var serializer = new BinaryFormatter();
            serializer.Serialize(testFileStream, board);
            testFileStream.Close();

            SaveBanker();
        }
Ejemplo n.º 2
0
 // Singleton method to access
 public static Board Access()
 {
     return _board ?? (_board = new Board());
 }
Ejemplo n.º 3
0
 public void SetBoardFromLoadedBoard(Board board)
 {
     _board = board;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// ***DO NOT USE, EXCEPT FOR TESTS***
 /// </summary>
 public void ResetBoard()
 {
     _board = null;
 }