Skip to content

Commit

Permalink
Merge pull request #310 from boriszaitsev/master
Browse files Browse the repository at this point in the history
Фикс смерти на своей территории
  • Loading branch information
SannikovDmitry authored Jul 30, 2019
2 parents 6227b23 + 158abc8 commit d3d2f70
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions paperio/local_runner/game_objects/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ def check_loss(self, player, players):
is_loss = True
self.append_event('line crossed by other player', player, p)

for p in players:
if is_intersect((player.x, player.y), (p.x, p.y)) and p != player:
if len(player.lines) >= len(p.lines):
is_loss = True
self.append_event('faced with other player', player, p)
if len(player.lines) > 0:
for p in players:
if is_intersect((player.x, player.y), (p.x, p.y)) and p != player:
if len(player.lines) >= len(p.lines):
is_loss = True
self.append_event('faced with other player', player, p)
break

if len(player.territory.points) == 0:
is_loss = True
Expand Down

0 comments on commit d3d2f70

Please sign in to comment.