static void Main(string[] args) { Board board = new Board(); Cell[,] cells = board.getCells(); Console.WriteLine("Win List Test"); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { Console.WriteLine(cells[i, j].printWinList()); } } board.ResetPiece(); Console.WriteLine("\nIs Valid Move Test"); addPieceToBoard("11", Piece.PLAYER1, board); addPieceToBoard("22", Piece.PLAYER1, board); addPieceToBoard("12", Piece.PLAYER2, board); addPieceToBoard("33", Piece.PLAYER2, board); Console.WriteLine("string [hello] (False): " + board.isValidMove("hello").ToString()); Console.WriteLine("string [02] (False): " + board.isValidMove("02").ToString()); Console.WriteLine("Pieces string: " + board.GetPieces()); Console.WriteLine("\nPrint Board Test"); Console.WriteLine(board); Console.ReadKey(); }
static void Main(string[] args) { Board board = new Board(); Console.WriteLine(board); Console.ReadKey(); board.ResetPieces(); board.Move("11", Piece.PLAYER1); board.Move("12", Piece.PLAYER1); board.Move("13", Piece.PLAYER2); board.Move("22", Piece.PLAYER2); Console.WriteLine("pieces: " + board.GetPieces()); Console.ReadKey(); board.ResetPieces(); Console.WriteLine("pieces: " + board.GetPieces()); Console.ReadKey(); }