class Snake::World
- Snake::World
- Reference
- Object
Defined in:
snake/world.crConstructors
Instance Method Summary
- #add(item : Snake::Player)
- #add(item : Snake::Apple)
- #apples : Array(Snake::Apple)
- #height : Int16
- #map : Array(Array(Player | Tail | Apple | Nil))
- #move(player : Snake::Player)
- #players : Array(Snake::Player)
- #remove(player : Snake::Player)
- #remove(apple : Snake::Apple)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #update
- #width : Int16
Constructor Detail
Instance Method Detail
def to_s
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.