class Snake::Player
- Snake::Player
- Reference
- Object
Defined in:
snake/player.crConstant Summary
-
DIRECTION_SPEED =
{Directions::Up => VERT_DELAY, Directions::Down => VERT_DELAY, Directions::Right => HORIZONTAL_DELAY, Directions::Left => HORIZONTAL_DELAY}
-
HORIZONTAL_DELAY =
0.01
-
VERT_DELAY =
HORIZONTAL_DELAY * 3
Constructors
Instance Method Summary
- #can_change?(direction)
- #chage_direction(direction : Snake::Coordinate)
- #direction : Coordinate
- #direction=(direction : Coordinate)
- #grow_tail
- #head : Coordinate
- #head=(head : Coordinate)
- #move : Nil
- #tail : Array(Tail)
- #tail=(tail : Array(Tail))
- #x : Int16
- #y : Int16