For Oshisaure :)

This commit is contained in:
Ishaan Bhardwaj 2020-10-07 13:24:28 -04:00
parent 3cc918841f
commit bdad32ac79

View File

@ -58,7 +58,8 @@ function Grid:canPlaceBigPiece(piece)
for index, offset in pairs(offsets) do
local x = piece.position.x + offset.x
local y = piece.position.y + offset.y
if x >= 5 or x < 0 or y >= 12 or y < 0 or
if y < 0 then return true
elseif x >= 5 or x < 0 or y >= 12 or
self.grid[y * 2 + 1][x * 2 + 1] ~= empty or
self.grid[y * 2 + 1][x * 2 + 2] ~= empty or
self.grid[y * 2 + 2][x * 2 + 1] ~= empty or
@ -150,11 +151,13 @@ function Grid:applyPiece(piece)
for index, offset in pairs(offsets) do
x = piece.position.x + offset.x
y = piece.position.y + offset.y
if y + 1 > 0 then
self.grid[y+1][x+1] = {
skin = piece.skin,
colour = piece.shape
}
end
end
end
function Grid:applyBigPiece(piece)