def test_burst_sets_actions_burst(self): cell = Cell(1, 2, 3, Vec2(4, 5), Vec2(6, 7)) cell.burst() actions = cell.actions() self.assertTrue(actions.burst) self.assertIsNotNone(actions.target)
def test_trade_sets_actions_trade(self): cell = Cell(1, 2, 3, Vec2(4, 5), Vec2(6, 7)) cell.trade(42) actions = cell.actions() self.assertEqual(42, actions.trade) self.assertIsNotNone(actions.target)
def test_actions_sets_actions_target(self): cell = Cell(1, 2, 3, Vec2(4, 5), Vec2(6, 7)) cell.move(Vec2(6, 7)) actions = cell.actions() self.assertEqual(1, actions.cell_id) self.assertTrue(Vec2(6, 7).almost_equals(actions.target))
def test_actions_do_nothing(self): cell = Cell(1, 2, 3, Vec2(4, 5), Vec2(6, 7)) actions = cell.actions() self.assertIsNone(actions)