mirror of
https://github.com/Lyxminxx/binarian.git
synced 2026-10-11 20:57:41 +02:00
Finished the two main gamemodes and added a menu system
This commit is contained in:
1 parent
767d49b6be
commit
a69b711289
6 files changed
+189
-32
No files matched your search
+12
-1
@@ -1,7 +1,6 @@
|
||||
from alphabet import alphabet
|
||||
from os import system, name
|
||||
|
||||
|
||||
def binarian(word):
|
||||
wordBin = ""
|
||||
word = word.lower()
|
||||
@@ -14,6 +13,18 @@ def binarian(word):
|
||||
wordBin += letter
|
||||
return wordBin
|
||||
|
||||
import re
|
||||
|
||||
def unbinarian(encoded_text):
|
||||
from alphabet import alphabet
|
||||
|
||||
reverse_alphabet = {v: k for k, v in alphabet.items()}
|
||||
|
||||
decoded = re.sub(r"\(\d{5}\)", lambda m: reverse_alphabet.get(m.group(), m.group()), encoded_text)
|
||||
|
||||
return decoded
|
||||
|
||||
|
||||
def clear():
|
||||
|
||||
# for windows
|
||||
|
||||
Reference in new issue
Block a user