# pylint: disable=missing-docstring
# pylint: disable=too-few-public-methods
import random
import string
import requests

class Game:
    def __init__(self):
        self.grid = [random.choice(string.ascii_uppercase) for x in range(9)]

    def is_valid(self, word):

        if len(word) > 0:
            result = True
            for letter in word:
                if letter not in self.grid:
                    result = False
                    break
            return (result and self.__check_dictionary(word))


        return False

    def __check_dictionary(self, word):
        r = requests.get(f"https://wagon-dictionary.herokuapp.com/{word}")
        response = r.json()
        return response['found']

fbfe943aed22bd3d83ca3c94b94a62c49284d413
<mask token>


class Game:
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Game:

    def __init__(self):
        self.grid = [random.choice(string.ascii_uppercase) for x in range(9)]
    <mask token>
    <mask token>

<mask token>


class Game:

    def __init__(self):
        self.grid = [random.choice(string.ascii_uppercase) for x in range(9)]

    def is_valid(self, word):
        if len(word) > 0:
            result = True
            for letter in word:
                if letter not in self.grid:
                    result = False
                    break
            return result and self.__check_dictionary(word)
        return False
    <mask token>

<mask token>


class Game:

    def __init__(self):
        self.grid = [random.choice(string.ascii_uppercase) for x in range(9)]

    def is_valid(self, word):
        if len(word) > 0:
            result = True
            for letter in word:
                if letter not in self.grid:
                    result = False
                    break
            return result and self.__check_dictionary(word)
        return False

    def __check_dictionary(self, word):
        r = requests.get(f'https://wagon-dictionary.herokuapp.com/{word}')
        response = r.json()
        return response['found']

# pylint: disable=missing-docstring
# pylint: disable=too-few-public-methods
import random
import string
import requests

class Game:
    def __init__(self):
        self.grid = [random.choice(string.ascii_uppercase) for x in range(9)]

    def is_valid(self, word):

        if len(word) > 0:
            result = True
            for letter in word:
                if letter not in self.grid:
                    result = False
                    break
            return (result and self.__check_dictionary(word))


        return False

    def __check_dictionary(self, word):
        r = requests.get(f"https://wagon-dictionary.herokuapp.com/{word}")
        response = r.json()
        return response['found']
