Skip to content

Instantly share code, notes, and snippets.

@brentluna
Created May 11, 2016 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brentluna/34e3c44384d33dc5bf576dd1b943003f to your computer and use it in GitHub Desktop.
Save brentluna/34e3c44384d33dc5bf576dd1b943003f to your computer and use it in GitHub Desktop.
class Board
def initialize(grid)
@grid = grid
end
def self.from_file(file)
grid = parse_file(file)
Self.new(grid)
end
def parse_file(file)
#take file and make multi-dimensional arary
end
end
board = Board.from_file(file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment