Fix boundaries test error
This commit is contained in:
parent
6473e22447
commit
3c97673d50
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue