private void DrawGameObject(ILaneObject gameObject, int laneX, int laneY) { Console.CursorLeft = laneX + gameObject.LanePosition; Console.ForegroundColor = gameObject.Color; Console.Write(gameObject.Symbol); Console.ResetColor(); }
public bool IsInsideLane(ILaneObject laneObject) { var lanePosition = laneObject.LanePosition; var pastTowerCheck = 0 <= lanePosition; var pastLengthCheck = lanePosition <= Length; var isInside = pastTowerCheck && pastLengthCheck; return(isInside); }
public static bool HasCollision(ILaneObject obj1, ILaneObject obj2) { return(obj1.LanePosition == obj2.LanePosition); }