Added danger: "coward hypnotism rat"

- Added distance-based state transitions (distance to window's left border).
- Fixed an error which caused segmentation fault when doing a time-based state transition.