Vector Management Replace the solitary brick object with a vector of 5 bricks. 1. Edit Game.h to #include 2. Add 5 bricks to the vector with their positions evenly spaced across a single row. 3....

1 answer below »

Vector Management


Replace the solitary brick object with a vector of 5 bricks.


1. Edit Game.h to #include


2. Add 5 bricks to the vector with their positions evenly spaced across a single row.


3. Update the Game::Render function to utilize the vector.


4. Update the Game::CheckCollision function to check all the bricks.


Collision Response


If a brick is hit by the ball 3 times, remove it from the vector.


Win Condition


If no bricks remain, pause the ball and print the following text to the middle of the screen. You win! Press ‘R’ to play again.


Lose Condition


If the ball touches the bottom of the window, pause the ball and print the following text to the middle of the screen. You lose. Press ‘R’ to play again.



Answered Same DaySep 01, 2022

Answer To: Vector Management Replace the solitary brick object with a vector of 5 bricks. 1. Edit Game.h to...

Aditi answered on Sep 02 2022
70 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here