Skip to content

Commit

Permalink
Include tile rotations in action.
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbons committed May 25, 2020
1 parent e55bec9 commit 6768c70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion wingedsheep/carcassonne/objects/actions/tile_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


class TileAction(Action):
def __init__(self, tile: Tile, coordinate: Coordinate):
def __init__(self, tile: Tile, coordinate: Coordinate, tile_rotations: int):
self.tile = tile
self.coordinate = coordinate
self.tile_rotations = tile_rotations
3 changes: 2 additions & 1 deletion wingedsheep/carcassonne/utils/action_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def get_possible_actions(state: CarcassonneGameState):
for playing_position in possible_playing_positions:
action = TileAction(
tile=state.next_tile.turn(playing_position.turns),
coordinate=playing_position.coordinate
coordinate=playing_position.coordinate,
tile_rotations=playing_position.turns
)
actions.append(action)
elif state.phase == GamePhase.MEEPLES:
Expand Down

0 comments on commit 6768c70

Please sign in to comment.