Javierss
commited on
Commit
·
b96b639
1
Parent(s):
c5edb82
Change file extension
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.json → possible_words.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:0acc4b06bfd8d72b250224beb8f91700a1a6e27f7fc3383ab475ba3a0ef0a7d8
|
3 |
+
size 6080412
|
data/ranking.txt
CHANGED
@@ -1,4 +1 @@
|
|
1 |
-
|
2 |
-
---------------------------
|
3 |
-
['#2', 'amigo', 7.62]
|
4 |
-
['#1', 'loco', 6.76]
|
|
|
1 |
+
---------------------------
|
|
|
|
|
|
game_transformer.py
CHANGED
@@ -24,7 +24,7 @@ class Semantrix:
|
|
24 |
|
25 |
config_file_path = "config/lang.json"
|
26 |
secret_file_path = "config/secret.json"
|
27 |
-
possible_words_file_path = "config/possible_words.
|
28 |
data_path = "data/"
|
29 |
|
30 |
class DictWrapper:
|
@@ -53,8 +53,8 @@ class Semantrix:
|
|
53 |
with open(self.data_path + "ranking.txt", "w+") as file:
|
54 |
file.write("---------------------------")
|
55 |
|
56 |
-
with open(self.possible_words_file_path, "
|
57 |
-
self.possible_words =
|
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 = "config/possible_words.gz"
|
28 |
data_path = "data/"
|
29 |
|
30 |
class DictWrapper:
|
|
|
53 |
with open(self.data_path + "ranking.txt", "w+") as file:
|
54 |
file.write("---------------------------")
|
55 |
|
56 |
+
with gzip.open(self.possible_words_file_path, "rt", encoding="utf-8") as f:
|
57 |
+
self.possible_words = f.read().splitlines()
|
58 |
|
59 |
def prepare_game(self, difficulty):
|
60 |
|