Skip to content

Commit

Permalink
Removed _sol from various keys used to refer to the dictionaries. Sta…
Browse files Browse the repository at this point in the history
…rted building ClassicGame subclass of Game class and cleaned up award_stars_xp method.
  • Loading branch information
Graysdull committed Feb 15, 2024
1 parent 46a039f commit e42fb5f
Show file tree
Hide file tree
Showing 3 changed files with 287 additions and 150 deletions.
144 changes: 72 additions & 72 deletions resources/gameplay.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,152 +4,152 @@
"1": {
"start_word": "link",
"end_word": "pink",
"10k_sol": 2,
"88k_sol": 2,
"280k_sol": 2,
"34k_sol": 2
"10k": 2,
"88k": 2,
"280k": 2,
"34k": 2
},
"2": {
"start_word": "pink",
"end_word": "pin",
"10k_sol": 2,
"34k_sol": 2,
"88k_sol": 2,
"280k_sol": 2
"10k": 2,
"34k": 2,
"88k": 2,
"280k": 2
},
"3": {
"start_word": "pin",
"end_word": "pain",
"10k_sol": 2,
"34k_sol": 2,
"88k_sol": 2,
"280k_sol": 2
"10k": 2,
"34k": 2,
"88k": 2,
"280k": 2
},
"4": {
"start_word": "pain",
"end_word": "brain",
"10k_sol": 3,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 3,
"34k": 3,
"88k": 3,
"280k": 3
},
"5": {
"start_word": "brain",
"end_word": "crane",
"10k_sol": null,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": null,
"34k": 3,
"88k": 3,
"280k": 3
},
"6": {
"start_word": "crane",
"end_word": "chain",
"10k_sol": 3,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 3,
"34k": 3,
"88k": 3,
"280k": 3
},
"7": {
"start_word": "chain",
"end_word": "name",
"10k_sol": 4,
"34k_sol": 4,
"88k_sol": 4,
"280k_sol": 4
"10k": 4,
"34k": 4,
"88k": 4,
"280k": 4
},
"8": {
"start_word": "name",
"end_word": "chance",
"10k_sol": 5,
"34k_sol": 5,
"88k_sol": 4,
"280k_sol": 4
"10k": 5,
"34k": 5,
"88k": 4,
"280k": 4
},
"9": {
"start_word": "chance",
"end_word": "heart",
"10k_sol": 4,
"34k_sol": 4,
"88k_sol": 4,
"280k_sol": 4
"10k": 4,
"34k": 4,
"88k": 4,
"280k": 4
},
"10": {
"start_word": "heart",
"end_word": "tree",
"10k_sol": 3,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 3,
"34k": 3,
"88k": 3,
"280k": 3
}
},
"Act2": {
"name": "Act 1 - Childhood",
"1": {
"start_word": "joy",
"end_word": "toy",
"10k_sol": 2,
"34k_sol": 2,
"88k_sol": 2,
"280k_sol": 2
"10k": 2,
"34k": 2,
"88k": 2,
"280k": 2
},
"2": {
"start_word": "toy",
"end_word": "toys",
"10k_sol": 2,
"34k_sol": 2,
"88k_sol": 2,
"280k_sol": 2
"10k": 2,
"34k": 2,
"88k": 2,
"280k": 2
},
"3": {
"start_word": "toys",
"end_word": "joy",
"10k_sol": 3,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 3,
"34k": 3,
"88k": 3,
"280k": 3
},
"4": {
"start_word": "ball",
"end_word": "doll",
"10k_sol": 4,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 4,
"34k": 3,
"88k": 3,
"280k": 3
},
"5": {
"start_word": "doll",
"end_word": "bear",
"10k_sol": 5,
"34k_sol": 5,
"88k_sol": 5,
"280k_sol": 5
"10k": 5,
"34k": 5,
"88k": 5,
"280k": 5
},
"6": {
"start_word": "bear",
"end_word": "care",
"10k_sol": 2,
"34k_sol": 2,
"88k_sol": 2,
"280k_sol": 2
"10k": 2,
"34k": 2,
"88k": 2,
"280k": 2
},
"7": {
"start_word": "care",
"end_word": "share",
"10k_sol": 3,
"34k_sol": 3,
"88k_sol": 3,
"280k_sol": 3
"10k": 3,
"34k": 3,
"88k": 3,
"280k": 3
}
},
"Act3": {
"name": "Act 3 - 20.000 leagues under the sea",
"1": {
"start_word": "ocean",
"end_word": "diver",
"10k_sol": null,
"34k_sol": 5,
"88k_sol": 5,
"280k_sol": 5
"10k": null,
"34k": 5,
"88k": 5,
"280k": 5
},
"2": {
"start_word": "diver",
Expand Down
21 changes: 11 additions & 10 deletions tools/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,22 +291,23 @@ def __init__(self) -> None:
for i, line in enumerate(file):
ENGLISH_WORDS_280K.append(line.replace("\n", ""))

DICT_ID_LIST: list[str] = ["10k", "34k", "88k", "280k"]
NB_DICTS: int = len(DICT_ID_LIST)

ENGLISH_WORDS_DICTS = {
"10k": ENGLISH_WORDS_10K,
"34k": ENGLISH_WORDS_34K,
"88k": ENGLISH_WORDS_88K,
"280k": ENGLISH_WORDS_280K
DICT_ID_LIST[0]: ENGLISH_WORDS_10K,
DICT_ID_LIST[1]: ENGLISH_WORDS_34K,
DICT_ID_LIST[2]: ENGLISH_WORDS_88K,
DICT_ID_LIST[3]: ENGLISH_WORDS_280K
}

DICT_ID_TO_NB_WORDS = {
"10k": 10000,
"34k": 34000,
"88k": 88000,
"280k": 375000
DICT_ID_LIST[0]: 10000,
DICT_ID_LIST[1]: 34000,
DICT_ID_LIST[2]: 88000,
DICT_ID_LIST[3]: 375000
}

DICT_ID_LIST = ["10k", "34k", "88k", "280k"]

### Levels ###

GAMEPLAY_DICT = load_json_file(PATH_GAMEPLAY)
Expand Down
Loading

0 comments on commit e42fb5f

Please sign in to comment.