- Prof. Dancy's Site - Course Site -
The year is 2022. Personal space transport is common and you have taken your space ship out exploring. You find an ancient abandoned planet and decided to land and investigate. There was a huge storm as you landed and your ship now lies in pieces on a landing pad. There is no oxygen in air but you are able to move around in your rover. You have a repair manual, which tells you how to fix your ship, but you don't have the needed spare parts.
You see strange items scattered around on the ground. Maybe they will be useful. You also see strange glowing orbs big enough to swallow your rover. When you touch one, you get sucked in and appear in another place with items and orbs. The orb was a portal! When you re-enter the same portal, it takes you back where you came from.
Your goal is to move about the portal system and collect enough spare parts to fix your ship.
Phase 1 | Phase 2 | Phase 3 | Phase 5 |
Way Back
button must now be fully functional.As your rover travels deep into this barren world filled with both vast desert landscapes and delicious cake, it's likely that you will get lost. How do you find your way back to your ship? To help the rover, you'll implement the Way Back
button. Whenever this button is hit, the room's portal that contains a path to your ship will change color. This will allow you to always get back to your ship.
Show the way back
button, the GUI will call show_way_back()
.Whenever you have to develop a feature that allows users retrace their steps (either in a browser with the back button or ann app with an undo button), your mind should jump to using a Stack
. Think carefully about how you should use a Stack in your program to recover the rover's way back home.
We are intentionally leaving these details open for interpretation. It's up to you to decide the way to make your program functional. Don't forget to do lots of testing!
Graded item | Number of points |
---|---|
General Running | |
The rover and ship components and the parts all still have working images | 5 pts |
The quit button still works | 5 pts |
The rover can still move | 5 pts |
The rover can still stand on things | 5 pts |
The rover can still go through portals | 10 pts |
The inventory still works | 10 pts |
Stack | |
Something about portals or rooms must be stored in a Stack ADT written by the student (not built into python). | 10 pts |
The stack methods are appropriately named push and pop. | 5 pts |
Show the way back button | |
When the way back button is hit, the portal leading towards the starting room will change images to the “flashing” image – it probably won’t actually flash. | 15 pts |
When the rover walks thru a portal (any portal), no portals will have the flashing image seen. | 15 pts |
The rover will NOT teleport magically when the way back button is hit. | 5 pts |
Good design principles used | 10 pts |
Total | 100 pts |