-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrawModule.py
More file actions
53 lines (41 loc) · 1.1 KB
/
drawModule.py
File metadata and controls
53 lines (41 loc) · 1.1 KB
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
def createField():
field = []
# Create the Field
for row in range(13):
temp = []
for col in range(39):
temp.append(' ')
field.append(temp)
# Draw horizontal lines of Field
for x in range(2,13,3):
for y in range(14,37):
field[x][y] = '_'
# Draw vertical lines of Field
for x in range(3, 12):
for y in range(13,39,8):
field[x][y] = '|'
# Write coordinates of the Field
field[1][17] = 1
field[1][25] = 2
field[1][33] = 3
field[4][8] = 'a'
field[7][8] = 'b'
field[10][8] = 'c'
return field
def printField(field):
# Print the Field
for rows in range(13):
for cols in range(39):
print(field[rows][cols], end='')
print()
print()
print('--------------------------------------------')
print()
print('Help: Player 1 - O')
print(' Player 2 - X')
print(' q - Quit the game')
print()
print('Coordinate example: a1')
print()
print('--------------------------------------------')
print()