Try and have a variable keeping track of the number of bricks left to destroy and if that number reaches zero you know the player has won the game. Just check this every time a brick is destroyed.
...