Fix boundaries test error
This commit is contained in:
parent
6473e22447
commit
3c97673d50
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ public class Grid {
|
||||||
if (point.X < MinGrid.X || point.Y < MinGrid.Y)
|
if (point.X < MinGrid.X || point.Y < MinGrid.Y)
|
||||||
return false;
|
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;
|
return false;
|
||||||
|
|
||||||
for (uint x = 0; x < shape.GetLength(0); x++)
|
for (uint x = 0; x < shape.GetLength(0); x++)
|
||||||
|
|
Reference in a new issue