public bool IsCrashed(IVisualPlayer player) { bool overlapXCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers (this.X, this.XEnd, player.X, player.XEnd); bool overlapYCoordinate = CrashElementsHelper.IsTwoNumberBetweenRangeOfTowNumbers (this.Y, this.YEnd, player.Y, player.YEnd); bool crashed = overlapXCoordinate && overlapYCoordinate; return(crashed); }
public static bool IsCrashedTwoElement(IVisualPlayer player1, StaticItem item) { return(player1.IsCrashed(item)); }
public static bool IsCrashedTwoElement(IVisualPlayer player1, IVisualPlayer player2) { return(player1.IsCrashed(player2)); }
public static void MoveRight(IVisualPlayer player) { player.MoveRight(); }
public static void MoveDown(IVisualPlayer player) { player.MoveDown(); }
public static void MoveUp(IVisualPlayer player) { player.MoveUp(); }