-
Notifications
You must be signed in to change notification settings - Fork 0
/
tiktaktoe.py
68 lines (48 loc) · 1.49 KB
/
tiktaktoe.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pick player and validate input
#player 1 and player 2 - toggle between the two - one at a time
players = ['player 1', 'player 2']
choices = ['X', 'O']
def correct_your_choice():
draw = input("please pick who will start the show:")
while draw not in players:
draw = input("Wrong choice. please pick who will start the show:")
print(draw + " to start")
def first_draw():
drawer = input("please pick who will start the show:")
if drawer not in players:
print("Invalid choice.Draw again")
correct_your_choice()
else:
print(drawer + " to start")
choice = input("make your choice please:")
while choice not in choices:
print("This is an invalid choice. Please pick either X or O")
print(drawer + " has picked " + choice)
def draw_board():
row1 = ["-","-","-"]
row2 = ["-","-","-"]
row3 = ["-","-","-"]
print(row1)
print(row2)
print(row3)
def draw_board2():
row1 = ["-","-","-"]
row2 = ["-","-","-"]
row3 = ["-","-","-"]
print(row1) + "r"
print(row2) + "s"
print(row3) + "t"
def pick_choice():
choice = input
#draw board
def draw_board():
row1 = ["-","-","-"]
row2 = ["-","-","-"]
row3 = ["-","-","-"]
print(row1)
print(row2)
print(row3)
# until either board is full or the sequence is made - ask for input and draw board
# validate input
# place on board
# check board