-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.py
26 lines (23 loc) · 927 Bytes
/
board.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
from __future__ import print_function
from termcolor import colored
class BoardMaker:
def printMatrix(self, Matrix, array):
# print("Start Game")
for i in range(42):
for j in range(84):
temp = Matrix[i][j]
if(array[i][j] == 1 and temp == ' '):
temp = 'B'
if temp == 'B':
print(colored(temp, 'blue'), end='')
elif temp == '/':
print(colored(temp, 'yellow'), end='')
elif temp == 'E':
print(colored(temp, 'red'), end='')
elif temp == 'e':
print(colored(temp, 'cyan'), end='')
elif(temp == 'O' or temp == '1' or temp == '2' or temp == '3'):
print(colored(temp, 'magenta'), end='')
else:
print(temp, end='')
print()