examples/pending/netris/src/grid.rb
# Done with the piece, tell it to break apart into individual block actors, then
# keep a reference to those blocks int he position they should be in
Done with the piece, tell it to break apart into individual block actors, then
keep a reference to those blocks int he position they should be in
Done with the piece tell it to break apart into individual block actors then keep a reference to those blocks int he position they should be in
def piece_finished
    blocks = build_blocks
    blocks.each do |block|
      @field[
        @falling_piece.grid_position.y + block.grid_offset_y
      ][
        @falling_piece.grid_position.x + block.grid_offset_x
      ] = block
    end
    new_piece
    check_row_removal
  end
def piece_finished blocks = build_blocks blocks . each do | block | @field [ @falling_piece . grid_position . y + block . grid_offset_y ] [ @falling_piece . grid_position . x + block . grid_offset_x ] = block end new_piece check_row_removal end
Done with the piece, tell it to break apart into individual block actors, then
keep a reference to those blocks int he position they should be in
Done with the piece tell it to break apart into individual block actors then keep a reference to those blocks int he position they should be in