Skip to content

Instantly share code, notes, and snippets.

@kitwalker12
Last active January 28, 2020 00:20
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 kitwalker12/419ffc7ea900bdba18c23810e84a4464 to your computer and use it in GitHub Desktop.
Save kitwalker12/419ffc7ea900bdba18c23810e84a4464 to your computer and use it in GitHub Desktop.
Game of Life Boilerplate
public class GameOfLife {
GameOfLife() { // state may be passed here
}
public void evolve {
}
public void print {
}
}
// GameOfLife life = new GameOfLife
// life.evolve()
// life.print()
var GameOfLife = {
init: function() {
},
evolve: function() {
},
print: function() {
}
};
class GameOfLife
attr_accessor :state
def initialize(state)
end
def evolve
end
def print
end
end
# life = GameOfLife.new
# life.evolve
# life.print
@kengogo
Copy link

kengogo commented Jan 28, 2020

  • Want to have TS
  • Use const for GameOfLife in JS
  • Prefer to have to_s instead of print (and make this work with p instance, puts instance in Ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment