示例#1
0
 def __init__(self):
     boardPattern = """
                     . . . . . .
                     . . . . . .
                     . . # # # .
                     . # # # . .
                     . . . . . .
                     . . . . . .
                     """
     self.board = Board.setup(boardPattern, EventManager())
示例#2
0
 def __init__(self):
     strPattern = """
                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                   . # # # # # # # # # # . # # # # # # # # . # # # . . . . . . . # # # # # # # # # # .
                   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                 """
     self.board = Board.setup(strPattern, EventManager())
     print self.board
     self.board.newGeneration()
     print self.board
示例#3
0
 def __init__(self):
    self.board = Board.new(5,5, EventManager())
    self.board.setCellAlive(1, 2)
    self.board.setCellAlive(2, 2)
    self.board.setCellAlive(3, 2)