Archived
1
0
Fork 0

Fix boundaries test error

This commit is contained in:
Ethanell 2022-04-07 13:51:49 +02:00
parent 6473e22447
commit 3c97673d50

View file

@ -20,7 +20,7 @@ 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++)