-
Notifications
You must be signed in to change notification settings - Fork 0
/
tictaktoe.py
44 lines (33 loc) · 978 Bytes
/
tictaktoe.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
# theBoard = {
# 'top_L': ' ', 'top_M': ' ', 'top_R': ' ',
# 'mid_L': ' ', 'mid_M': ' ', 'mid_R': ' ',
# 'low_L': ' ', 'low_M': ' ', 'low_R': ' '
# }
# def printBoard(board):
# print(board['top_L'] + '|' + board['top_M'] + '|' + board['top_R'])
# print('-+-+-')
# print(board['mid_L'] + '|' + board['mid_M'] + '|' + board['mid_R'])
# print('-+-+-')
# print(board['low_L'] + '|' + board['low_M'] + '|' + board['low_R'])
# turn = 'X'
# for i range(9):
# printBoard(theBoard)
# print(f"Turn the {turn}. Move in which space?")
# move = input()
# theBoard[move] = turn
# if turn == 'X':
# turn = 'O'
# else:
# turn == 'X'
# printBoard(theBoard)
stuff = {
'rope': 1,
'torch': 6,
'gold coin': 42,
'dagger': 1,
'arrow': 12
}
def displayInventory(inventory):
print('Inventory:')
item_total = 0
for k, v in inventory.item_total():