def __init__(self): boardPattern = """ . . . . . . . . . . . . . . # # # . . # # # . . . . . . . . . . . . . . """ self.board = Board.setup(boardPattern, EventManager())
def __init__(self): strPattern = """ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # # # # # # # # # . # # # # # # # # . # # # . . . . . . . # # # # # # # # # # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . """ self.board = Board.setup(strPattern, EventManager()) print self.board self.board.newGeneration() print self.board
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)