Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 273 Weeks Ago, 4 Days Ago |
Questions Answered: | 1850 |
Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Hello hch88 A, I saw that you have helped a few people with these types of programming assignments and wanted to ask for your help on this gsp 125 iLab 7. I posted the questions below and attached the a zip folder that contains the whole program. I would appreciate if you could help me because it is due April 16, this Sunday, thank you.
Â
// 1) Replace Vector2 and Coordinate
//Â a) Create a new Vec2 class as a replacement for both Vector2 and
//Â Â Â Coordinate. Vec2 must be a templated class, so that it stores and
//Â Â Â manipulates X and Y values of a templated type. It may be helpful to
//Â Â Â start with the Vector2 class, add "template<typename TYPE>" to the
//Â Â Â header, and replace (Ctrl+H) each instance of "float" with "TYPE", and
//Â Â Â "Vector2" with "Vec2".
//Â b) Remember, a templated class must have all method definitions in the
//Â Â Â same file as the templated class declaration. Also remember that method
//Â Â Â definitions outside of a templated class' declaration need aÂ
//Â Â Â "template<typename TYPE>" header, and a "<TYPE>" appended to the class
//Â Â Â name with the scope resolution operator (e.g.:Â
//Â Â Â "void Vec2<TYPE>::limitMagnitude(TYPE max) {/* method body */}").
//Â c) Replace the use of Vector2 with Vec2<float>.
//Â d) Replace the use of Coordinate with Vec2<int>.
// 2) More Game Goals
//Â a) Instead of having a single goal for the player, create at least 3
//Â Â Â randomly placed goals for the player. Use a "std::vector<Entity>"Â
//Â Â Â object (from the Standard Template Library) named "goals" to store the
//Â Â Â goals.
//Â c) Whenever the user clicks in the game window, the game should create
//Â Â Â another goal object for the player to get, and add it to the
//Â Â Â "std::vector<Entity> goals" object.
//Â d) Each retrieved goal should be removed from the game after being
//Â Â Â retrieved by the player. A "You Win!" message should display when the
//Â Â Â player retrieves all goals.
//
// [Autonomous Agent] The player controlled Entity can move to collect each
//Â Â Â goal without any user input!
// [He's Coming, RUN!] Create a MovingTarget class that extends Entity, and use
//Â Â Â that for the game goals. Each MovingTarget should wander randomly and
//Â Â Â slowly, running away from the player if the player comes withing a
//Â Â Â certain radius. Be sure to prevent goal entities from escaping the game
//Â Â Â boundaries!
// [I'll Make My Own List] Create your own templated list type and use it
//Â Â Â instead of the std::vector class.
// [Blocked!] Implement collision detection, so that Entity objects can't
//Â Â Â occupy the same area.
// [We've Had Enough!] Create a Hunter class that extends Entity, and slowly
//Â Â Â follows the player's Entity, ending the game in defeat if the player
//Â Â Â should be caught by a Hunter.
// [Let's Fight!] Create a Projectile class that acts as a projectile attack
//Â Â Â for the player's Entity. Keep track of all projectiles in the game with
//Â Â Â a "vector<Projectile>" object. If there are Hunters in the game,
//Â Â Â give Hunters a projectile attack as well! Don't forget to remove
//Â Â Â projectiles from the game once they hit something or leave the game
//Â Â Â boundaries!
Attachments:Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I