Snake
Dependencies: microbit
Fork of microbit_snake by
A Snake Game with animation, score and continuous play
Steps:
- Switch On.
- Snake animation plays.
- Game starts.
- Press buttons to move the snake left, right, up and down.
- Food appears as a dot on the display.
- Try eating the food by manoeuvring Snake to run over it.
- Snake grows as it eats food.
- As it grows it becomes hard to avoid snake biting itself.
- Game Over.
- Snake is flashed and then score is scrolled.
- Game restarts after replaying animation.
Controls:
- Left Button (A)
- If snake moving UP/DOWN moves snake to LEFT.
- If snake moving LEFT moves snake to DOWN.
- If snake moving RIGHT moves snake to UP.
- Right Button (B)
- If snake moving UP/DOWN moves snake to RIGHT.
- If snake moving LEFT moves snake to UP.
- If snake moving RIGHT moves snake to DOWN.
How it looks:
https://www.youtube.com/watch?v=unEs3NOvIKA
Binary to play with
/media/uploads/mazimkhan/microbit_snake_nrf51_microbit.hex
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
5:9328487a0a46 | 2016-04-13 | mazimkhan | Changed random max to 5 to allow value between 0-4 for x,y coordinates. Otherwise we are stuck in an endless loop trying find good snake food! |
4:9fd9402eca3d | 2016-04-12 | mazimkhan | Moved check for snake bit after moving tail up. It fixes issue of snake bit when it is 5 points long and revolving in one direction. |
3:a0200bceae4b | 2016-04-10 | mazimkhan | Added animation at the start of the game. |
2:38060465e019 | 2016-04-10 | mazimkhan | Removed printfs |
1:6cfdf4a39678 | 2016-04-10 | mazimkhan | Removed microbit-lite-test.lib dependency. |
0:af1bb8b895c7 | 2016-04-10 | mazimkhan | A simple sanke game on microbit |