Sha256: e1e814385f5a812911d15bf0eb91b1377d63a17b58fb9e75b4b9e7aae8a90342
Contents?: true
Size: 408 Bytes
Versions: 3
Compression:
Stored size: 408 Bytes
Contents
class Game attr_accessor :grid def initialize(rows,cols) @grid = Grid.new(rows, cols) end def create_at(row,col) @grid.create_at(row,col) end def destroy_at(row,col) @grid.destroy_at(row, col) end def self.from_string(dots) grid = Grid.from_string(dots) game = new(grid.rows, grid.columns) game.instance_eval do @grid = grid end return game end end
Version data entries
3 entries across 3 versions & 1 rubygems