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.
If a brick is hit by the ball 3 times, remove it from the vector.
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.
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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here