|
-
December 6th, 2011, 11:12 AM
#11
Re: Composition - accessing & updating members
Additionally, here is the output I'm getting, and the project guidelines that I had to create the project from:
Output:
Round 0:
No collisions!
Round 1:
No collisions!
Round 2:
No collisions!
Round 3:
Collision between ship 1 at (5, 5, 5) and ship 2 at (5, 5, 5)
Round 4:
Collision between ship 0 at (4, 4, 4) and ship 2 at (4, 4, 4)
Round 5:
Collision between ship 0 at (5, 5, 5) and ship 1 at (5, 5, 5)
Round 6:
No collisions!
Round 7:
No collisions!
Round 8:
No collisions!
Round 9:
No collisions!
-----------------------------------------
Guidelines:
Create a new class Ship that uses the class Coordinate as its location in a game board.
• The program must implement the detectCollisions function as defined in the pa10-skeleton.cpp (I had to define this function myself) to simulate game collision detection.
• Ships have a Coordinate, a x_inertia, a y_intertia, and a z_inertia
• All inertias are double types (and are private)
• Ships can provide their coordinate with the getLocation()method
• Ships can update their location by one turn with the updateLocation() method
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|