Exemplo n.º 1
0
 /// <summary>
 /// Returns true if the object can move in the given direction; false otherwise.
 /// </summary>
 /// <remarks>
 /// See remarks in documentation for <see cref="GameObjectExtensions.CanMove(IGameObject, Point)" /> for details
 /// on when this function should return false.
 /// </remarks>
 /// <param name="self" />
 /// <param name="direction">The direction of movement to check.</param>
 /// <returns>True if the object can be moved in the specified direction; false otherwise</returns>
 public static bool CanMoveIn(this IGameObject self, Direction direction)
 => self.CanMove(self.Position + direction);