Previous: Advancing our Game further
To make the game more interactive, we introduce the player element. We need to move the player to collect the boxes.
We first check if the total boxes collected are less than boxes to collect. If condition holds we drop a box and collect.
initialize boxcollected to zero
initialize totalboxes to zero
initialize boxtocollect to 40
While totalboxes < boxtocollect
increase boxcollected by one
increase totalboxes by one
Our pseudo-code is taking shape now.
Next: Reminder of our goal