public void MoveY(int val) { if (val > 0) { for (var i = 0; i < val; i++) { XY.Y += 1; XY.Steps += 1; Positions.Add(XY.Clone() as XY); } } else { for (var i = 0; i > val; i--) { XY.Y -= 1; XY.Steps += 1; Positions.Add(XY.Clone() as XY); } } }