/ Published in: Python
Expand |
Embed | Plain Text
def showBoard(coord = 0): """ prints function in console. coord = TRUE : prints coordinates coord = FALSE: prints without coordinates """ if not coord: for i in range(8): for j in range(8): if board[i][j] == "em": print "..", else: print board[i][j], else: coord = ['1','2','3','4','5','6','7','8'] for i in range(8): print coord[7-i], "|", for j in range(8): if board[i][j] == "em": print "..", else: print board[i][j], print " -----------------------" print " a b c d e f g h"
You need to login to post a comment.
