Midterm Update:Snake game
- Steven Gonzalez
- Oct 9, 2019
- 1 min read
The wiring I think is right since its just simple setting up button. The problem I have is with the code because its not working and I don't know why. I put in a while loop till the sprite(snake) touches the edge and makes it false. I tried to make the buttons toggle I thought maybe that would fix it but it didn't. And put a while do for the toggle so when its held down it moves and added a change sprite x by ___. And did that for the others except put y in some so it moves up. But that doesn't work and I don't know why. I'm not sure if instead of using the sprites I should create an array but I wouldn't know how to display it on the 5x5 led screen. And I still haven't started assembling a container because I want to make it work first and add some red and green leds.
https://makecode.microbit.org/_b5rRhw5Vr8DJ
Comments