def printBoard(self, t='live'):
"""
Print board to terminal for debugging
@param string type 'virtual' or 'live'
"""
board = self.board if t == 'live' else self.virtualBoard
print(Back.GREEN + "\t BOARD ")
# Print column titles
head = Back.GREEN + Fore.WHITE + "\t "
for i in range(self.board.shape[0]):
head += '|' + str(i)
print(head)
# Print rows
for i in range(self.board.shape[0]):
print(Back.GREEN + Fore.WHITE + "\t" + str(i) + getRow(board[i]))
print(Style.RESET_ALL)
return
评论列表
文章目录