Ejemplo n.º 1
0
def find_words_in_board():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    boogle_instance = StandardBoggle(1, 4)
    boogle_instance.game_paralell_process()
    print(boogle_instance.get_game_end_info())
Ejemplo n.º 2
0
    def test_settings_correct(self):
        try:
            SettingsParser.load_settings(silent=True)
            success = True
        except SystemExit:
            success = False

        self.assertTrue(success)
Ejemplo n.º 3
0
    def test_dictionary_correct(self):
        SettingsParser.load_settings(silent=True)
        try:
            DictionaryParser.load_dictionary(language=SettingsParser.get_setting('language'), silent=True)
            success = True
        except SystemExit:
            success = False

        self.assertTrue(success)
Ejemplo n.º 4
0
def main():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    MenuParser.generate_menu()
Ejemplo n.º 5
0
def generate_board():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    boogle_instance = FoggleBoggle(2, 4)
    print(boogle_instance.get_board_string(0, colored=False))
Ejemplo n.º 6
0
def mock_game():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    GameLogic.run_game(boggle_class=StandardBoggle, mockup=True)
Ejemplo n.º 7
0
 def test_settings_incorrect_format(self):
     path = get_root_dir() / 'tests' / 'test_settings_incorrect_format.json'
     try:
         SettingsParser.load_settings(path, silent=True)
     except SystemExit as cm:
         self.assertEqual(cm.code, 3)
Ejemplo n.º 8
0
 def test_settings_wrong_filepath(self):
     path = '/this_dosnt_exist'
     try:
         SettingsParser.load_settings(path, silent=True)
     except SystemExit as cm:
         self.assertEqual(cm.code, 1)
Ejemplo n.º 9
0
def standard_setup():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(language=SettingsParser.get_setting('language'))
    SettingsParser.set_setting('generous_boggle', False)
    HostIO.set_terminal_output(False)