Difference between revisions of "CS1 3rd Quarter Exam"
From WLCS
(New page: ===Objective:=== * Design and implement a game where a player may move side to side on the screen in order to dodge falling objects * This exam is open-book, open-note, open-computer, CLOS...) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <!-- | ||
===Objective:=== | ===Objective:=== | ||
* Design and implement a game where a player may move side to side on the screen in order to dodge falling objects | * Design and implement a game where a player may move side to side on the screen in order to dodge falling objects | ||
Line 14: | Line 15: | ||
# Your ball should fall from the top to the bottom of the screen | # Your ball should fall from the top to the bottom of the screen | ||
# Inside your game loop, if the ball reaches past the bottom of the screen, then... | # Inside your game loop, if the ball reaches past the bottom of the screen, then... | ||
− | #* Reset its y-coordinate to | + | #* Reset its y-coordinate back to the top of the screen |
− | #* Randomize its x-coordinate | + | #* Randomize its x-coordinate between 0 and 800 (or however wide the screen is) |
'''Successful dodge counter (5 points):''' | '''Successful dodge counter (5 points):''' | ||
Line 23: | Line 24: | ||
'''Collisions (5 points):''' | '''Collisions (5 points):''' | ||
* If the player collides with a falling object (i.e. if the object hits the player), then there should be a game over message | * If the player collides with a falling object (i.e. if the object hits the player), then there should be a game over message | ||
− | * If the player successfully avoids | + | * If the player successfully avoids 10 falling objects, then there should be a win message |
'''Bonus (5 points):''' | '''Bonus (5 points):''' | ||
− | * Create | + | * Create 5+ falling objects that all work |
+ | --> |