标记游戏板

时间:2015-03-01 02:07:18

标签: python

我不确定如何标记表格中的行和列。如果我想要用数字标记行和列,我是创建一个单独的函数还是只是将它添加到现有代码中?谢谢你的帮助!

class GameLogic:
    def __init__(self, row, column):
        self._self = self
        self._column = column
        self._row = row
    def create_board(self):
        self._board = []
        for row in range(1,self._row+1):
            row = ''
            for col in range(1,self._column+1):
                if self._board == ' ':
                    row = ' '
                else:
                    row =  '. '
                print(row, end = '')
            print()

0 个答案:

没有答案