Example #1
0
 private void DrawGameObject(ILaneObject gameObject, int laneX, int laneY)
 {
     Console.CursorLeft      = laneX + gameObject.LanePosition;
     Console.ForegroundColor = gameObject.Color;
     Console.Write(gameObject.Symbol);
     Console.ResetColor();
 }
Example #2
0
        public bool IsInsideLane(ILaneObject laneObject)
        {
            var lanePosition = laneObject.LanePosition;

            var pastTowerCheck  = 0 <= lanePosition;
            var pastLengthCheck = lanePosition <= Length;

            var isInside =
                pastTowerCheck &&
                pastLengthCheck;

            return(isInside);
        }
Example #3
0
 public static bool HasCollision(ILaneObject obj1, ILaneObject obj2)
 {
     return(obj1.LanePosition == obj2.LanePosition);
 }