My students would like to design games like the Bug Grab.
Would they be setting it up like Lesson 8’s Emoji Race, but instead of
[onBoardEvent ButtonL press]
and [OnBoardEvent ButtonR press]
code be the “bug” instead of “red” or “blue” or ? ??
Then in the
[function movePlayer player]
how do we make the ButtonL press go left and ButtonR press go right?
And how would the onBoard event know the difference?
Does anyone have the exemplar for Bug Grab game?
Use the x property of the bug.
The app is very similar to the emoji race with a few subtle differences.
The players are still using the buttonL and buttonR to interact with the game. But instead of moving the emojis down, we use the x property of the bug to move it left or right.
If buttonL is pressed move the bug to the left
If buttonR is pressed move the bug to the right.
Just checking in - did what @mmathews say make sense?
Do you think you could share the link to their code so we could see how it works? Sounds like a fun idea.
The code is a mess right now. They need to clean the game up still, but the game screen code is working and switches to the win screen with the correct winner announced.