-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (37 loc) · 1.17 KB
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from player import Player
from game import Game
player1 = Player()
player2 = Player()
def welcome():
print("\nBem vindos ao \033[1;30mJogo da Velha!\033[m")
print("Vamos começar com os nomes dos jogadores: ")
player1.setNome()
player2.setNome()
print(f"Que bom poder jogar com vocês {player1.getNome()} e {player2.getNome()}")
def menu():
print("Escolha uma opção: ")
print("1 - Começar o Jogo")
print("2 - Ver quantidade de pontos")
print("3 - Sair do jogo")
option = 0
while option != 3:
option = int(input("\nOpção: "))
match option:
case 1:
# Começar o jogo;
startGame()
return
case 2:
# mostrar o placar
return
case 3:
print("Muito obrigado por ter jogado conosco!\nPlacar no final:")
print("Até a próxima!")
exit()
def startGame():
game = Game(player1, player2)
game.startGame()
def main():
welcome()
menu()
main()