Avoid starting on same position
This commit is contained in:
parent
2dde0ed3d9
commit
b93a7c3f39
2
pytron
2
pytron
|
@ -1 +1 @@
|
|||
Subproject commit 28e8aae4ee2b582cbabad44484e05a50ded0bd0f
|
||||
Subproject commit aa5b65aeccda3858127ebb01a639e99c0d38ae7c
|
|
@ -43,6 +43,8 @@ def run_battle(ai1, ai2):
|
|||
for _ in range(games):
|
||||
initial_position_one = [random.randint(0, width - 1), random.randint(0, height - 1)]
|
||||
initial_position_two = [random.randint(0, width - 1), random.randint(0, height - 1)]
|
||||
while initial_position_one[0] == initial_position_two[0] and initial_position_one[1] == initial_position_two[1]:
|
||||
initial_position_two = [random.randint(0, width - 1), random.randint(0, height - 1)]
|
||||
|
||||
game = Game(width, height, [
|
||||
PositionPlayer(1, ai1.builder(), initial_position_one),
|
||||
|
|
Loading…
Reference in New Issue