-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.py
28 lines (25 loc) · 768 Bytes
/
login.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import security
import findInFile
import signup
import game
def login():
username = str(input("Enter name:")).lower()
password = str(input("Enter password:"))
line = findInFile.findInFile(username)
if line:
lineSplit = line.split(':')
lineUser = lineSplit[0]
linePassword = lineSplit[1]
if security.checkEncryptedPassword(password,linePassword):
print("Logged in!")
game.main(lineUser)
else:
print("It Does not Match :(")
else:
print("User not found")
registerNewUser = bool(input("Do you wanna join? y/n?")=='y')
if registerNewUser:
signup.signup(username,password)
game.main(username)
else:
exit()