Javierss
commited on
Commit
·
e180617
1
Parent(s):
b96b639
Change file extension split
Browse files
__pycache__/game_transformer.cpython-311.pyc
CHANGED
Binary files a/__pycache__/game_transformer.cpython-311.pyc and b/__pycache__/game_transformer.cpython-311.pyc differ
|
|
config/{possible_words.gz → possible_words_part1.gz}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3cdee4ac8ccd290a1e2b62762a88183132d82a4a20cca4c98cdd2aead3d2b8b0
|
3 |
+
size 3040618
|
config/possible_words_part2.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:57d2bb64bff51827be8bf24d5689f3f49670fe556010d8cb3f2cc98875c155f2
|
3 |
+
size 3040822
|
data/ranking.txt
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
|
|
|
|
|
|
1 |
+
['#1', 'a', 6.34]
|
2 |
+
---------------------------
|
3 |
+
['#1', 'a', 6.34]
|
game_transformer.py
CHANGED
@@ -24,7 +24,8 @@ class Semantrix:
|
|
24 |
|
25 |
config_file_path = "config/lang.json"
|
26 |
secret_file_path = "config/secret.json"
|
27 |
-
|
|
|
28 |
data_path = "data/"
|
29 |
|
30 |
class DictWrapper:
|
@@ -53,8 +54,13 @@ class Semantrix:
|
|
53 |
with open(self.data_path + "ranking.txt", "w+") as file:
|
54 |
file.write("---------------------------")
|
55 |
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
def prepare_game(self, difficulty):
|
60 |
|
|
|
24 |
|
25 |
config_file_path = "config/lang.json"
|
26 |
secret_file_path = "config/secret.json"
|
27 |
+
possible_words_file_path_1 = "config/possible_words_part1.gz"
|
28 |
+
possible_words_file_path_2 = "config/possible_words_part2.gz"
|
29 |
data_path = "data/"
|
30 |
|
31 |
class DictWrapper:
|
|
|
54 |
with open(self.data_path + "ranking.txt", "w+") as file:
|
55 |
file.write("---------------------------")
|
56 |
|
57 |
+
self.possible_words = []
|
58 |
+
with gzip.open(self.possible_words_file_path_1, "rt", encoding="utf-8") as f1:
|
59 |
+
self.possible_words.extend(f1.read().splitlines())
|
60 |
+
|
61 |
+
# Load the second part
|
62 |
+
with gzip.open(self.possible_words_file_path_2, "rt", encoding="utf-8") as f2:
|
63 |
+
self.possible_words.extend(f2.read().splitlines())
|
64 |
|
65 |
def prepare_game(self, difficulty):
|
66 |
|