Answered step by step
Verified Expert Solution
Link Copied!

Question

...
1 Approved Answer

Basketball Now try having more players as discussed in Exercise 16.2. You may find it frustrating to try and hit the basketball just with a

Basketball

Now try having more players as discussed in Exercise 16.2. You may find it frustrating to try and hit the basketball just with a spherical player. What if you have your player inherit from cCritterWall ? You could then either always adjust the wall to be at right angles to the current direction of motion, or you could create a richer kind of listener that lets you rotate the wall. A good combination might be to use the mouse to move the player and to use the left and right mouse buttons or Left and Right Arrow keys to rotate the player.

Make a tennis game Make a player that is a child of cCritterWall and which hits things like a paddle. Give it a listener that makes it possible to rotate the paddle with the Arrow keys or with left/right mouse clicks. Put a short vertical wall in the middle for a net

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management Accounting Information for Decision-Making and Strategy Execution

Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young

6th Edition

978-0137024971

Students also viewed these Programming questions