Skip to content

Instantly share code, notes, and snippets.

@alexyoung
Created April 2, 2009 21:24
Show Gist options
  • Select an option

  • Save alexyoung/89501 to your computer and use it in GitHub Desktop.

Select an option

Save alexyoung/89501 to your computer and use it in GitHub Desktop.
class GameBoard
class Food < GameItem
def initialize(app, x, y, colour = '#00ff00')
super
end
end
def initialize(app)
@food_items = []
@app = app
end
def add_food(x, y)
@food_items << Food.new(@app, x, y)
end
def collision_at?(x, y)
end
def remove_food_at(x, y)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment