private int isPlacementOk(int row, int col, int markercolor)
    {
        //check if location is within board
        if ((row >= totalrow || row < 0) || (col >= totalcol || col < 0))
            return invalid_move;
            //check if location is on an empty square
        else if (board[row][col] != EMPTY)
            return invalid_move;
            //check if location is next to an actual value and points
        else if (check(row, col, markercolor) == false)
        {
            return invalid_move;
        }
        else
            return valid_move;
    }