Class ChangeSet.MoveChange

    • Field Detail

      • unit

        private final Unit unit
      • oldLocation

        private final Location oldLocation
      • newTile

        private final Tile newTile
    • Constructor Detail

      • MoveChange

        public MoveChange​(ChangeSet.See see,
                          Unit unit,
                          Location oldLocation,
                          Tile newTile)
        Build a new MoveChange.
        Parameters:
        see - The visibility of this change.
        unit - The Unit that is moving.
        oldLocation - The location from which the unit is moving.
        newTile - The Tile to which the unit is moving.
    • Method Detail

      • seeOld

        private boolean seeOld​(Player player)
        Can a player see the old tile?
        Parameters:
        player - The Player to test.
        Returns:
        True if the old tile is visible.
      • seeNew

        private boolean seeNew​(Player player)
        Can a player see the new tile?
        Parameters:
        player - The Player to test.
        Returns:
        True if the new tile is visible.
      • isNotifiable

        public boolean isNotifiable​(Player player)
        Should a player be notified of this Change? Override in subclasses with special cases.
        Overrides:
        isNotifiable in class ChangeSet.Change<AnimateMoveMessage>
        Parameters:
        player - The Player to consider.
        Returns:
        True if this Change should be sent.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object