Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | Source Code | 0 0
  1. from gasp import *
  2. from random import randint
  3.  
  4.  
  5. def place_player():
  6.     player_x =  10 * randint(0, 63) + 5
  7.     player_y =  10 * randint(0, 47) + 5
  8.     Circle((player_x, player_y), 5)
  9.  
  10.  
  11. def move_player():
  12.     print("I'm moving...")
  13.     update_when('key_pressed')
  14.  
  15.  
  16. begin_graphics()
  17. finished = False
  18.  
  19. place_player()
  20.  
  21. while not finished:
  22.     move_player()
  23.  
  24. end_graphics()
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement