Skip to content

Commit

Permalink
Fixed a bug where farmers could be placed on all tiles of a farm.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbons committed May 19, 2020
1 parent 41f6df2 commit 5d34e74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main/utils/possible_move_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ def __possible_farmer_position(cls, game_state: CarcassonneGameState) -> [Coordi
if FarmUtil.has_meeples(game_state, farm):
continue
else:
farmer_connection_with_coordinate: FarmerConnectionWithCoordinate
for farmer_connection_with_coordinate in farm.farmer_connections_with_coordinate:
playing_positions.append(CoordinateWithSide(farmer_connection_with_coordinate.coordinate, farmer_connection_with_coordinate.farmer_connection.farmer_positions[0]))
farmer_position: Side = farmer_connection.farmer_positions[0]
playing_positions.append(CoordinateWithSide(last_played_position, farmer_position))

return playing_positions

0 comments on commit 5d34e74

Please sign in to comment.