Opening project sandbox
Preparing the editor and runtime...
Preparing the editor and runtime...
Start from a blank editor and follow the directions below.
0/4 passed
Run your code, then check each checkpoint before moving on.
1. Control paddles with W/S and Up/Down.
Not checkedExample pattern (not the full solution):
# Add logic for this step inside your update loop
if condition_for_step:
# update state here
pass2. Move the ball and bounce on walls/paddles.
Not checkedExample pattern (not the full solution):
keys = pygame.key.get_pressed()
if keys[pygame.K_LEFT]:
player.x -= speed
if keys[pygame.K_RIGHT]:
player.x += speed3. Score when the ball exits a side.
Not checkedExample pattern (not the full solution):
if player_reached_goal:
score += 14. First to five wins.
Not checkedExample pattern (not the full solution):
# Add logic for this step inside your update loop
if condition_for_step:
# update state here
pass