def setUp(self): shape = (8, 8) self.board = GameBoard(shape) self.state = GameState(shape) self.blue_tank = buildFigure('Tank', (6, 4), BLUE) self.red_tank = buildFigure('Tank', (1, 4), RED) self.red_inf = buildFigure('Infantry', (2, 4), RED) self.state.addFigure(self.red_tank, self.red_inf, self.blue_tank)
def setUp(self): shape = (16, 16) self.board = GameBoard(shape) self.state = GameState(shape) self.inf_1 = buildFigure('Infantry', (5, 11), RED) self.inf_2 = buildFigure('Infantry', (7, 12), RED) self.target_1 = buildFigure('Infantry', (3, 13), BLUE) self.target_2 = buildFigure('Infantry', (5, 13), BLUE) self.target_3 = buildFigure('Infantry', (7, 13), BLUE) self.target_4 = buildFigure('Infantry', (9, 13), BLUE) self.state.addFigure( self.inf_1, self.inf_2, self.target_1, self.target_2, self.target_3, self.target_4, )
def setUp(self): shape = (16, 16) self.board = GameBoard(shape) self.state = GameState(shape) self.inf_1 = buildFigure('Infantry', (4, 0), RED) self.inf_2 = buildFigure('Infantry', (8, 0), BLUE) self.state.addFigure( self.inf_1, self.inf_2, ) self.red = Puppet(RED) self.red.action = GM.actionMove(self.board, self.state, self.inf_1, destination=self.inf_1.position) self.red.response = GM.actionNoResponse(RED) self.blue = Puppet(BLUE) self.blue.action = GM.actionMove(self.board, self.state, self.inf_2, destination=self.inf_2.position) self.blue.response = GM.actionNoResponse(BLUE) self.mm = MatchManager('', self.red, self.blue)
def blank(shape) -> (GameBoard, GameState): return GameBoard(shape), GameState(shape)