예제 #1
0
파일: test_grid.py 프로젝트: Kilghaz/pyd20
 def test_path_between_tiles(self):
     grid = Grid.create_with_dimension(3, 3)
     start = grid.get_tile(1, 1)
     end = grid.get_tile(3, 3)
     path = grid.path_between_tiles(start, end)
     assert path is not None
     assert path.length() > 0
예제 #2
0
 def test_battle(self):
     battle = Battle(Grid.create_with_dimension(6, 6))
     battle.add_combatant(self.random_character(), 1, 1)
     battle.add_combatant(self.random_character(), 5, 5)
     print(battle)
     battle.next_round()
     print(battle)
예제 #3
0
파일: test_grid.py 프로젝트: Kilghaz/pyd20
 def test_create_with_dimension(self):
     grid = Grid.create_with_dimension(3, 3)
     assert len(grid.get_tiles()) == 9