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....


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.



Sep 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here