/// <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(); }
// Singleton method to access public static Board Access() { return _board ?? (_board = new Board()); }
public void SetBoardFromLoadedBoard(Board board) { _board = board; }
/// <summary> /// ***DO NOT USE, EXCEPT FOR TESTS*** /// </summary> public void ResetBoard() { _board = null; }