diff --git a/Models/Grid.cs b/Models/Grid.cs index d48f5f0..d4adda9 100644 --- a/Models/Grid.cs +++ b/Models/Grid.cs @@ -20,9 +20,9 @@ public class Grid { if (point.X < MinGrid.X || point.Y < MinGrid.Y) return false; - else if ((point.X + tetrominoe.Shape.GetLength(0)) > MaxGrid.X || (point.Y + tetrominoe.Shape.GetLength(1)) > MaxGrid.Y) + else if ((point.X + tetrominoe.Shape.GetLength(0)-1) > MaxGrid.X || (point.Y + tetrominoe.Shape.GetLength(1)-1) > MaxGrid.Y) return false; - + for (uint x = 0; x < shape.GetLength(0); x++) for (uint y = 0; y < shape.GetLength(1); y++) { Point s = point + new Size((int) x, (int) y);