CSCI 136 |
Console output. Your StayingAlive.java program should output the intial game state to the console window:stars.jpg dont_panic_40.png 0.5 0.5 0.035 100 6 asteroid_small.png 0.1 0.1 0.018 -0.002 -0.003 asteroid_medium.png 0.2 0.2 0.030 0.002 -0.003 aliens-alien-warrior-sixth-scale-hot-toys-silo-902693.png 0.3 0.3 0.065 -0.002 0.003 asteroid_small.png 0.4 0.4 0.018 -0.001 -0.004 11-pluto-icon.png 0.6 0.6 0.030 0.002 -0.003 asteroid_large.png 0.7 0.7 0.065 -0.0035 0.0025 # Hitchhikers Guide to the Galaxy: Avoid a bunch of objects # <background image> # <player image> <player x-position> <player y-position> <player radius> <player speed factor> # <number enemies> # <enemy0 image> <enemy0 x-position> <enemy0 y-position> <enemy0 radius> <enemy0 x-velocity> <enemy0 y-velocity> # <enemy1 image> <enemy1 x-position> <enemy1 y-position> <enemy1 radius> <enemy1 x-velocity> <enemy1 y-velocity> # ...
Canvas size and coordinates. In this assignment, we'll leave the canvas size at the default size of 512 x 512 pixels. We will also use the default coordinate system which has the lower-left corner being (0.0, 0.0) and the upper-right corner being (1.0, 1.0). Thus in this assignment you do NOT need to call methods such as StdDraw.setCanvasSize(), StdDraw.setXscale(), or StdDraw.setYscale().% java StayingAlive hitchhiker.txt PLAYER: (0.5, 0.5) r=0.035 speed=100 dont_panic_40.png ENEMY 0: (0.1, 0.1) vel (-0.0020, -0.0030) r=0.018 angle=258 asteroid_small.png ENEMY 1: (0.2, 0.2) vel (0.0020, -0.0030) r=0.03 angle=10 asteroid_medium.png ENEMY 2: (0.3, 0.3) vel (-0.0020, 0.0030) r=0.065 angle=37 asteroid_large.png ENEMY 3: (0.4, 0.4) vel (-0.0010, -0.0040) r=0.018 angle=98 asteroid_small.png ENEMY 4: (0.6, 0.6) vel (0.0020, -0.0030) r=0.03 angle=301 asteroid_medium.png ENEMY 5: (0.7, 0.7) vel (-0.0035, 0.0025) r=0.065 angle=5 asteroid_large.png
Grade Item | Points Possible | Points Earned |
---|---|---|
Programs Compile | 1 | |
Programs Run | 1 | |
javadoc Comments on All Classes and Methods | 4 | |
Uses Inheritance Appropriately | 6 | |
Enemy Class Implemented Correctly | 6 | |
Player Class Implemented Correctly | 6 | |
StayingAlive Client Implemented Correctly | 6 | |
Total | 30 |
Page last updated: December 20, 2019