Beispiel #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())
Beispiel #2
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)
 def settings_main_menu(exit_command):
     exit_command[0] = True
     SettingsParser.save_settings()
     DictionaryParser.load_dictionary(
         language=SettingsParser.get_setting('language'))
Beispiel #4
0
def main():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    MenuParser.generate_menu()
Beispiel #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))
Beispiel #6
0
def mock_game():
    SettingsParser.load_settings()
    DictionaryParser.load_dictionary(
        language=SettingsParser.get_setting('language'))
    GameLogic.run_game(boggle_class=StandardBoggle, mockup=True)
Beispiel #7
0
 def test_dictionary_incorrect_files_format(self):
     path = get_root_dir() / 'tests' / 'test_dict_format_incorrect'
     try:
         DictionaryParser.load_dictionary(path, silent=True)
     except SystemExit as cm:
         self.assertEqual(cm.code, 6)
Beispiel #8
0
 def test_dictionary_wrong_filepath(self):
     path = '/this_dosnt_exist'
     try:
         DictionaryParser.load_dictionary(path, silent=True)
     except SystemExit as cm:
         self.assertEqual(cm.code, 4)
Beispiel #9
0
def load_minimal_language():
    path = get_root_dir() / 'tests' / 'test_dict_minimal_lang'
    DictionaryParser.load_dictionary('complete lang', language_dir=path, silent=True)
Beispiel #10
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)