Monday, 21 November 2016

Update our pseudo code

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
drop box
Move playerbox
if collected
  increase boxcollected by one
print boxcollected
end if
increase totalboxes by one
print totalboxes
end while


Our pseudo-code is taking shape now.

Next: Reminder of our goal

No comments:

Post a Comment