public void BoardTests_IsInFieldTrue()
        {
            Board board = new Board(GameBoardRows, GameBoardCols, StartColorRange, EndColorRange);

            bool isInFieldTrue = board.IsInField(GameBoardRows - 2, GameBoardCols - 2);
            Assert.IsTrue(isInFieldTrue, "Problem with IsInField method!");
        }
        public void BoardTests_IsEmptyTrue()
        {
            Board board = new Board(GameBoardRows, GameBoardCols, 0, 0);

            bool isEmptyTrue = board.IsEmpty();
            Assert.IsTrue(isEmptyTrue, "Problem with IsEmpty method!");
        }
        public void BoardTests_IsEmptyFalse()
        {
            Board board = new Board(GameBoardRows, GameBoardCols, StartColorRange, StartColorRange);

            bool isEmptyFalse = board.IsEmpty();
            Assert.IsFalse(isEmptyFalse, "Problem with IsEmpty method!");
        }
        public void BoardTests_FieldTest()
        {
            Board board = new Board(GameBoardRows, GameBoardCols, StartColorRange, EndColorRange);

            bool isField = board.Field is GameObject[,];
            Assert.IsTrue(isField, "Field is not array of game objects");
        }
 public void BoardTests_RowsCols()
 {
     Board board = new Board(GameBoardRows, GameBoardCols, StartColorRange, EndColorRange);
     bool rowsCheck = board.BoardRows == GameBoardRows;
     bool colsCheck = board.BoardCols == GameBoardCols;
     Assert.IsTrue(rowsCheck && colsCheck, "Cols and rows are not set correctly");
 }
 public void BoardTests_PropertyExceptionRows()
 {
     Board board = new Board(-4, 2, StartColorRange, EndColorRange);
 }
 public void BoardTests_PropertyExceptionCols()
 {
     Board board = new Board(4, -2, StartColorRange, EndColorRange);
 }
 public void BoardTests_Construtor()
 {
     Board firstBoard = new Board(GameBoardRows, GameBoardCols, StartColorRange, StartColorRange);
     Board secondBoard = new Board(GameBoardRows, GameBoardCols, StartColorRange, StartColorRange);
     Assert.AreEqual(firstBoard.ToString(), secondBoard.ToString(), "Problem with the constructor");
 }
 /// <summary>
 /// Starts a new game by making a new board and reset the number of moves and calls the game loop method.
 /// </summary>
 private void StartNewGame(bool isGameRunning = false)
 {
     this.board = new Board(GameBoardRows, GameBoardCols, StartColorRange, EndColorRange);
     this.numberOfMoves = 0;
     if (!isGameRunning)
     {
         this.BeginGame();
     }
     else
     {
         this.DisplayInitialInfo();
     }
 }