Closed semiversus closed 6 years ago
Thanks @semiversus ! @d3lm mind reviewing this one?
Great article by the way. Helped me a lot. Working through your article I found a wrong link:
Nonetheless, you can find the source code for this on GitHub.
The link is pointing to d3lm's reactive-snake repository which is removed in the meantime.
Merging on behalf of @d3lm
Thanks @semiversus !
When the game is starting the detection of opposite directions is not working, because
.startWith(INITIAL_DIRECTION)
is after.scan(nextDirection)
, sonextDirection
is not called on first keydown.