15-112 Fall 2012 Quiz
8 (Not Autograded)
50 Minutes for quiz8 and quiz9 combined
Read these instructions first!
- This quiz is SOLO.
- This portion is worth 100 pts. There is no written portion this
week.
- No notes, books, web sites (except reading this quiz and accessing
Autolab).
- IDLE hint: python -m idlelib.idle &
- Autolab hint (to submit):
http://autolab.cs.cmu.edu/
- You must submit your quiz8.py file to Autolab before leaving the lab!
You will not have access to this file after you leave the lab!
- To start, download this one file:
quiz8.py (elided).
This contains full implementations of Tetris and Snake. You should
edit and submit that same file with the changes required by the exercises
below.
- Good luck! :-)
- Tetris Space-Fall [30 pts]
In Tetris, make it so that hitting the spacebar makes the current piece fall
all the way to the bottom (without animating, it just goes directly to its
final resting position) and starts a new piece immediately falling (and
ending the game if a new falling piece cannot be legally placed).
- Tetris Special-Z [30 pts]
In Tetris, make it so that if the user hits 'z' at any time, then whenever
the next falling piece is selected (at some future time), it will be a
z-piece. ALSO... This is the ONLY time a z piece will be selected.
(So a z piece will never be randomly selected.)
- Snake Immortality [40 pts]
In Snake, make it so that if the snake would die for any reason, instead
the move does not occur, giving the appearance that the snake is just paused
waiting for a legal move to be entered, at which point play resumes
normally.
carpe diem - carpe
diem - carpe diem - carpe diem - carpe diem - carpe diem -
carpe diem - carpe diem - carpe diem