game over if y >= nb_lines

This commit is contained in:
adrienmalin
2019-01-08 14:22:15 +01:00
parent db1c211852
commit ed5924f407
3 changed files with 11 additions and 5 deletions

View File

@ -42,7 +42,10 @@ func possible_positions(initial_positions, movement):
func lock(piece):
for position in piece.positions():
if position.y >= NB_LINES:
return false
set_cell_item(position.x, position.y, 0, MINO)
return true
func clear_lines():
var line_cleared