When the snake collides with a wall then it's tail becomes it's head.
[x] reverse method must be added to the snake class. Snake's new direction becomes the tail segment's inverted direction or the last known tail direction if the snake only has one segment and it's size is a single tile.
[x] fatal_collision_handler behavior needs to be created. wall class' collision_handler functionality should be moved into it.
[x] fatal_collision_handler component attached to the wall entity by default
bouncing_collision_handler class must be created
[x] implements the collision_handler interface
[x] reverts the snake
wall_bouncing class must be created
start
[x] queries all walls
[x] deactivates fatal_collision_handler component on all walls.
[x] adds bouncing_collision_handler to all walls
detach
[x] destroy bouncing_collision_handler components added to all walls
[x] activate fatal_collision_handler components on all walls
When the snake collides with a wall then it's tail becomes it's head.