+ def force_position(self, pos, delta=True):
+ if delta:
+ pos = (self.position[0] + pos[0],
+ self.position[1] + pos[1])
+ if (0 <= pos[0] < 5 and 0 <= pos[1] < 5):
+ self.position = pos
+
+ def set_gameboard(self, gameboard):
+ self.gameboard = gameboard
+
+ def pos_has_action(self, pos):
+ card = self.gameboard.board_locations[pos]
+ for action in card.actions:
+ if self.bits.check_bits(action.required_bits):
+ return True
+ return False
+
+ def filter_moves_with_no_actions(self, positions):
+ return [pos for pos in positions if self.pos_has_action(pos)]
+