Skip to content

Commit

Permalink
responsive for android screen
Browse files Browse the repository at this point in the history
  • Loading branch information
wishrohitv committed Nov 27, 2024
1 parent eba3b4b commit e24fd1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ def run_game():
# print(mouse_x, mouse_y)


if mouse_x > 223 and car_loc.right < road_w:
if mouse_x > width/2 and car_loc.right < road_w:
car_loc = car_loc.move([int(road_w/2), 0])

if mouse_x < 223 and car_loc.left > int(road_w/2):
if mouse_x < width/2 and car_loc.left > int(road_w/2):
car_loc = car_loc.move([-int(road_w/2), 0])


Expand Down

0 comments on commit e24fd1d

Please sign in to comment.