examples/pending/netris/src/grid.rb
# Move the piece down one row
Move the piece down one row
Move the piece down one row
def piece_down
    return unless @falling_piece
    @falling_piece.y += @block_size
    @falling_piece.grid_position.y += 1
    if collides?
      piece_up
      piece_finished
      true
    else
      false
    end
  end
def piece_down return unless @falling_piece @falling_piece . y += @block_size @falling_piece . grid_position . y += 1 if collides? piece_up piece_finished true else false end end
Move the piece down one row
Move the piece down one row
# If we collide going down, we're done and next # piece needs to start