To do this you would implement states. There are many ways to
manage states, from organic to design pattern. For very simple
games it's common to use a member attribute and some code (e.g.
brick.state, and an if:elif:else block that's sensitive to
brick.state) to handle the brick according to its state. (You can
do more fancy state concepts, but they would take a much longer
For example, store a number in brick.state:
0 = init
1 = falling
2 = collided with ground
3 = locked on ground
The brick would default to 0=init while waiting to be placed into play.
Then it would transition to 1=falling, where the player would have some control.
Next, collision with the ground would be detected, and trigger transition to 2=collide_with_ground; and a timer would be started to count elapsed time. I would store the elapsed time on the brick, but there are other ways to do it. Accumulate the elapsed time for every clock tick and check for expiration in code.
When the timer expires, then transition the brick to 3=locked_on_ground and do your win/end game checks.
Hope that helps.