mine.lua: passes 4-high, 5-high, and 6-high tests
This commit is contained in:
parent
b48d836929
commit
c7d317512b
1 changed files with 4 additions and 2 deletions
6
mine.lua
6
mine.lua
|
|
@ -252,15 +252,17 @@ function mine (block)
|
|||
local offset = 1
|
||||
if block.v2.y < 0 then offset = -1 end
|
||||
local height = block.v2.y + offset
|
||||
local start_v = copy_v(block.v1)
|
||||
local end_v = block.v1 + block.v2
|
||||
if height % 3 == 0 then
|
||||
mode.mine = { up = true, forward = true, down = true }
|
||||
elseif height == 2 then
|
||||
mode.mine = { forward = true, up = true }
|
||||
end_v = end_v - UNIT_Y
|
||||
elseif height == -2 then
|
||||
mode.mine = { forward = true, down = true }
|
||||
end_v = end_v + UNIT_Y
|
||||
end
|
||||
local start_v = copy_v(block.v1)
|
||||
local end_v = block.v1 + block.v2
|
||||
if height > 2 then
|
||||
start_v = start_v + UNIT_Y
|
||||
end_v = end_v - UNIT_Y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue