diff --git a/Snake.Avalonia/Views/SnakeRenderer.cs b/Snake.Avalonia/Views/SnakeRenderer.cs index 11a60f0..934004a 100644 --- a/Snake.Avalonia/Views/SnakeRenderer.cs +++ b/Snake.Avalonia/Views/SnakeRenderer.cs @@ -376,11 +376,19 @@ public sealed class SnakeRenderer : Control if (Segments == null) return (pos.X * CellSize + CellSize * 0.5, pos.Y * CellSize + CellSize * 0.5); + var isHead = segmentIndex == 0; + var isTail = Segments.Count > 1 && segmentIndex == Segments.Count - 1; + + // Only interpolate head and tail — middle segments stay grid-snapped + // to preserve sharp corners when the snake bends. + if (!isHead && !isTail) + return (pos.X * CellSize + CellSize * 0.5, pos.Y * CellSize + CellSize * 0.5); + var from = PreviousSegments != null && PreviousSegments.Count > 0 ? AnimationHelper.GetPreviousPosition(segmentIndex, Segments, PreviousSegments, SnakeDirection) : pos; - var useEasing = segmentIndex == 0; // Head gets easing for snappy feel - return AnimationHelper.InterpolatePosition(from, pos, t, CellSize, useEasing); + // Head gets easing for snappy feel; tail uses linear interpolation + return AnimationHelper.InterpolatePosition(from, pos, t, CellSize, useEasing: isHead); } }