'printing a board in python
I'm trying to create a chess game in python without uses pygame I know I'm not so far to finish it but I have a problem, I don't achieve to print my board in a nice way, for now I don't really care of what is inside here is my code
class Board:
def __init__(self, row, colomns, win):
self.row = row
self.colomns = colomns
self.win = win
self.board = []
self.create_board()
def create_board(self):
self.list=[]
for colomn in range(len(self.board)):
for row in range(len(self.board[0])):
self.list.append(0)
self.board.append(self.list)
for col in range(self.colomns):
pass
def draw_board(self):
for row in range(self.row):
for column in range(self.colomns):
Can you help?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
