Example #1
0
        public int checkGameStatus(gameBoard board)
        {
            int result = 0;

            for (int i = 0; i < board.getSize(); i++)
            {
                if ((board.getGameBoard())[0, i] == "3")
                {
                    result = 1;
                }
            }
            return(result);
        }
        public int checkRow(gameBoard board, int row, int col)
        {
            int rowResult = 0;

            for (int i = 1; i < board.getSize(); i++)
            {
                if (board.gameBoardObj[i, col] == "X")
                {
                    rowResult++;
                }
                else if (board.gameBoardObj[i, col] == "O")
                {
                    rowResult--;
                }
            }
            return(rowResult);
        }