karen_constantine

Untitled

Feb 12th, 2024
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.63 KB | None | 0 0
  1. import pygame
  2. import time
  3. import random
  4.  
  5. pygame.init()
  6.  
  7. display_width = 800
  8. display_height = 600
  9.  
  10. gameDisplay = pygame.display.set_mode((800,600))
  11. pygame.display.set_caption('PROG KIDS production')
  12.  
  13. icon = pygame.image.load("tank.jpg")
  14. pygame.display.set_icon(icon)
  15.  
  16.  
  17. wheat = (102, 145, 61)
  18.  
  19. introcolor = (190, 169, 146)
  20. white = (255, 255, 255)
  21. black = (0, 0, 0)
  22.  
  23.  
  24. red =(200,0,0)
  25. light_red = (255, 0, 0)
  26.  
  27. yellow = (200, 200, 0)
  28. light_yellow = (255, 255, 0)
  29.  
  30. green = (34, 177, 76)
  31. light_green = (0, 255, 0)
  32.  
  33. base = (203, 203, 203)
  34.  
  35. explode1 = (255, 153, 0)
  36. explode2 = (255, 102, 0)
  37. explode3 = (255, 204, 0)
  38. explode4 = (255, 204, 153)
  39.  
  40. tankupper = (0, 92, 165)
  41. tankrect = (0, 169, 252)
  42. tankwheels = (0, 92, 165)
  43. tankbottom = (0, 92, 165)
  44.  
  45. barriercolor = (236,228,86)
  46.  
  47. clock = pygame.time.Clock()
  48.  
  49. tankWidth = 40
  50. tankHeight = 20
  51.  
  52. turretWidth = 5
  53. wheelWidth = 5
  54.  
  55. ground_height = 35
  56.  
  57. smallfont = pygame.font.SysFont("comicsansms", 25)
  58. medfont = pygame.font.SysFont("comicsansms", 50)
  59. largefont = pygame.font.SysFont("Yu Mincho Demibold", 85)
  60. vsmallfont = pygame.font.SysFont("Yu Mincho Demibold", 25)
  61.  
  62. def text_objects(text, color, size="small"):
  63. if size == "small":
  64. textSurface = smallfont.render(text, True, color)
  65. if size == "medium":
  66. textSurface = medfont.render(text, True, color)
  67. if size == "large":
  68. textSurface = largefont.render(text, True, color)
  69. if size == "vsmall":
  70. textSurface = vsmallfont.render(text, True, color)
  71.  
  72. return textSurface, textSurface.get_rect()
  73.  
  74.  
  75. def message_to_screen(msg, color, y_displace=0, size="small"):
  76. textSurf, textRect = text_objects(msg, color, size)
  77. textRect.center = (int(display_width / 2), int(display_height / 2) + y_displace)
  78. gameDisplay.blit(textSurf, textRect)
  79.  
  80. def text_to_button(msg, color, buttonx, buttony, buttonwidth, buttonheight, size="vsmall"):
  81. textSurf, textRect = text_objects(msg, color, size)
  82. textRect.center = ((buttonx + (buttonwidth / 2)), buttony + (buttonheight / 2))
  83. gameDisplay.blit(textSurf, textRect)
  84.  
  85. def game_controls():
  86. gcont = True
  87.  
  88. while gcont:
  89. for event in pygame.event.get():
  90. if event.type == pygame.QUIT:
  91. pygame.quit()
  92. quit()
  93.  
  94. gameDisplay.fill(black)
  95. message_to_screen("Controls", white, -100, size="large")
  96. message_to_screen("Fire: Spacebar", wheat, -30)
  97. message_to_screen("Move Turret: Up and Down arrows", wheat, 10)
  98. message_to_screen("Move Tank: Left and Right arrows", wheat, 50)
  99. message_to_screen("Press D to raise Power % AND Press A to lower Power % ", wheat, 140)
  100. message_to_screen("Pause: P", wheat, 90)
  101.  
  102. button("Play", 150, 500, 100, 50, green, light_green, action="play")
  103. button("Main", 350, 500, 100, 50, yellow, light_yellow, action="main")
  104. button("Quit", 550, 500, 100, 50, red, light_red, action="quit")
  105.  
  106. pygame.display.update()
  107.  
  108. clock.tick(15)
  109.  
  110. def pause():
  111. paused = True
  112. message_to_screen("Paused", introcolor, -100, size="large")
  113. message_to_screen("Press C to continue playing or Q to quit", wheat, 25)
  114. pygame.display.update()
  115. while paused:
  116. for event in pygame.event.get():
  117.  
  118. if event.type == pygame.QUIT:
  119. pygame.quit()
  120. quit()
  121. if event.type == pygame.KEYDOWN:
  122. if event.key == pygame.K_c:
  123. paused = False
  124. elif event.key == pygame.K_q:
  125. pygame.quit()
  126. quit()
  127.  
  128. clock.tick(5)
  129.  
  130. def fireShell(xy, tankx, tanky, turPos, gun_power, xlocation, barrier_width, randomHeight, enemyTankX, enemyTankY):
  131. fire = True
  132. damage = 0
  133.  
  134. startingShell = list(xy)
  135.  
  136. while fire:
  137. for event in pygame.event.get():
  138. if event.type == pygame.QUIT:
  139. pygame.quit()
  140. quit()
  141.  
  142. pygame.draw.circle(gameDisplay, explode1, (startingShell[0], startingShell[1]), 5)
  143.  
  144. startingShell[0] -= (12 - turPos) * 2
  145.  
  146. startingShell[1] += int(
  147. (((startingShell[0] - xy[0]) * 0.015 / (gun_power / 50)) ** 2) - (turPos + turPos / (12 - turPos)))
  148.  
  149. if startingShell[1] > display_height - ground_height:
  150. hit_x = int((startingShell[0] * display_height - ground_height) / startingShell[1])
  151. hit_y = int(display_height - ground_height)
  152.  
  153. if enemyTankX + 10 > hit_x > enemyTankX - 10:
  154. damage = 25
  155. elif enemyTankX + 15 > hit_x > enemyTankX - 15:
  156. damage = 18
  157. elif enemyTankX + 25 > hit_x > enemyTankX - 25:
  158. damage = 10
  159. elif enemyTankX + 35 > hit_x > enemyTankX - 35:
  160. damage = 5
  161.  
  162. explosion(hit_x, hit_y)
  163. fire = False
  164.  
  165. check_x_1 = startingShell[0] <= xlocation + barrier_width
  166. check_x_2 = startingShell[0] >= xlocation
  167.  
  168. check_y_1 = startingShell[1] <= display_height
  169. check_y_2 = startingShell[1] >= display_height - randomHeight
  170.  
  171. if check_x_1 and check_x_2 and check_y_1 and check_y_2:
  172. hit_x = int((startingShell[0]))
  173. hit_y = int(startingShell[1])
  174. explosion(hit_x, hit_y)
  175. fire = False
  176.  
  177. pygame.display.update()
  178. clock.tick(60)
  179. return damage
  180.  
  181. def e_fireShell(xy, tankx, tanky, turPos, gun_power, xlocation, barrier_width, randomHeight, ptankx, ptanky):
  182. damage = 0
  183. currentPower = 1
  184. power_found = False
  185.  
  186. while not power_found:
  187. currentPower += 1
  188. if currentPower > 100:
  189. power_found = True
  190.  
  191. fire = True
  192. startingShell = list(xy)
  193.  
  194. while fire:
  195. for event in pygame.event.get():
  196. if event.type == pygame.QUIT:
  197. pygame.quit()
  198. quit()
  199.  
  200. startingShell[0] += (12 - turPos) * 2
  201. startingShell[1] += int(
  202. (((startingShell[0] - xy[0]) * 0.015 / (currentPower / 50)) ** 2) - (turPos + turPos / (12 - turPos)))
  203.  
  204. if startingShell[1] > display_height - ground_height:
  205. hit_x = int((startingShell[0] * display_height - ground_height) / startingShell[1])
  206. hit_y = int(display_height - ground_height)
  207. if ptankx + 15 > hit_x > ptankx - 15:
  208. power_found = True
  209. fire = False
  210.  
  211. check_x_1 = startingShell[0] <= xlocation + barrier_width
  212. check_x_2 = startingShell[0] >= xlocation
  213.  
  214. check_y_1 = startingShell[1] <= display_height
  215. check_y_2 = startingShell[1] >= display_height - randomHeight
  216.  
  217. if check_x_1 and check_x_2 and check_y_1 and check_y_2:
  218. hit_x = int((startingShell[0]))
  219. hit_y = int(startingShell[1])
  220. fire = False
  221.  
  222. fire = True
  223. startingShell = list(xy)
  224.  
  225. while fire:
  226. for event in pygame.event.get():
  227. if event.type == pygame.QUIT:
  228. pygame.quit()
  229. quit()
  230. pygame.draw.circle(gameDisplay, explode1, (startingShell[0], startingShell[1]), 5)
  231.  
  232. startingShell[0] += (12 - turPos) * 2
  233.  
  234. gun_power = random.randrange(int(currentPower * 0.90), int(currentPower * 1.10))
  235.  
  236. startingShell[1] += int(
  237. (((startingShell[0] - xy[0]) * 0.015 / (gun_power / 50)) ** 2) - (turPos + turPos / (12 - turPos)))
  238.  
  239. if startingShell[1] > display_height - ground_height:
  240. hit_x = int((startingShell[0] * display_height - ground_height) / startingShell[1])
  241. hit_y = int(display_height - ground_height)
  242.  
  243.  
  244. if ptankx + 10 > hit_x > ptankx - 10:
  245. damage = 25
  246. elif ptankx + 15 > hit_x > ptankx - 15:
  247. damage = 18
  248. elif ptankx + 25 > hit_x > ptankx - 25:
  249. damage = 10
  250. elif ptankx + 35 > hit_x > ptankx - 35:
  251. damage = 5
  252.  
  253. explosion(hit_x, hit_y)
  254. fire = False
  255.  
  256. check_x_1 = startingShell[0] <= xlocation + barrier_width
  257. check_x_2 = startingShell[0] >= xlocation
  258.  
  259. check_y_1 = startingShell[1] <= display_height
  260. check_y_2 = startingShell[1] >= display_height - randomHeight
  261.  
  262. if check_x_1 and check_x_2 and check_y_1 and check_y_2:
  263. hit_x = int((startingShell[0]))
  264. hit_y = int(startingShell[1])
  265. explosion(hit_x, hit_y)
  266. fire = False
  267.  
  268. pygame.display.update()
  269. clock.tick(60)
  270. return damage
  271.  
  272. def explosion(x, y, size=50):
  273. explode = True
  274.  
  275. while explode:
  276. for event in pygame.event.get():
  277. if event.type == pygame.QUIT:
  278. pygame.quit()
  279. quit()
  280.  
  281. startPoint = x, y
  282.  
  283. colorChoices = [explode1, explode2, explode3, explode4]
  284.  
  285. magnitude = 1
  286.  
  287. while magnitude < size:
  288. exploding_bit_x = x + random.randrange(-1 * magnitude, magnitude)
  289. exploding_bit_y = y + random.randrange(-1 * magnitude, magnitude)
  290.  
  291. pygame.draw.circle(gameDisplay, colorChoices[random.randrange(0, 4)], (exploding_bit_x, exploding_bit_y),
  292. random.randrange(1, 5))
  293. magnitude += 1
  294.  
  295. pygame.display.update()
  296. clock.tick(100)
  297.  
  298. explode = False
  299.  
  300. def health_bars(player_health, enemy_health):
  301. if player_health > 75:
  302. player_health_color = green
  303. elif player_health > 50:
  304. player_health_color = yellow
  305. else:
  306. player_health_color = red
  307.  
  308. if enemy_health > 75:
  309. enemy_health_color = green
  310. elif enemy_health > 50:
  311. enemy_health_color = yellow
  312. else:
  313. enemy_health_color = red
  314.  
  315. pygame.draw.rect(gameDisplay, player_health_color, (680, 25, player_health, 25))
  316. pygame.draw.rect(gameDisplay, enemy_health_color, (20, 25, enemy_health, 25))
  317.  
  318. def tank(x, y, turPos):
  319. x = int(x)
  320. y = int(y)
  321.  
  322. possibleTurrets = [(x - 27, y - 2),
  323. (x - 26, y - 5),
  324. (x - 25, y - 8),
  325. (x - 23, y - 12),
  326. (x - 20, y - 14),
  327. (x - 18, y - 15),
  328. (x - 15, y - 17),
  329. (x - 13, y - 19),
  330. (x - 11, y - 21)
  331. ]
  332.  
  333. pygame.draw.circle(gameDisplay, tankupper, (x, y), int(tankHeight / 2))
  334. pygame.draw.rect(gameDisplay, tankrect, (x - tankHeight, y, tankWidth, tankHeight))
  335.  
  336. pygame.draw.line(gameDisplay, tankupper, (x, y), possibleTurrets[turPos], turretWidth)
  337.  
  338. pygame.draw.circle(gameDisplay, tankbottom, (x - 15, y + 20), wheelWidth)
  339. pygame.draw.circle(gameDisplay, tankbottom, (x - 10, y + 20), wheelWidth)
  340.  
  341. pygame.draw.circle(gameDisplay, tankbottom, (x - 15, y + 20), wheelWidth)
  342. pygame.draw.circle(gameDisplay, tankbottom, (x - 10, y + 20), wheelWidth)
  343. pygame.draw.circle(gameDisplay, tankbottom, (x - 5, y + 20), wheelWidth)
  344. pygame.draw.circle(gameDisplay, tankbottom, (x, y + 20), wheelWidth)
  345. pygame.draw.circle(gameDisplay, tankbottom, (x + 5, y + 20), wheelWidth)
  346. pygame.draw.circle(gameDisplay, tankbottom, (x + 10, y + 20), wheelWidth)
  347. pygame.draw.circle(gameDisplay, tankbottom, (x + 15, y + 20), wheelWidth)
  348.  
  349. return possibleTurrets[turPos]
  350.  
  351. def enemy_tank(x, y, turPos):
  352. x = int(x)
  353. y = int(y)
  354.  
  355. possibleTurrets = [(x + 27, y - 2),
  356. (x + 26, y - 5),
  357. (x + 25, y - 8),
  358. (x + 23, y - 12),
  359. (x + 20, y - 14),
  360. (x + 18, y - 15),
  361. (x + 15, y - 17),
  362. (x + 13, y - 19),
  363. (x + 11, y - 21)
  364. ]
  365.  
  366. pygame.draw.circle(gameDisplay, tankupper, (x, y), int(tankHeight / 2))
  367. pygame.draw.rect(gameDisplay, tankrect, (x - tankHeight, y, tankWidth, tankHeight))
  368.  
  369. pygame.draw.line(gameDisplay, tankupper, (x, y), possibleTurrets[turPos], turretWidth)
  370.  
  371. pygame.draw.circle(gameDisplay, tankbottom, (x - 15, y + 20), wheelWidth)
  372. pygame.draw.circle(gameDisplay, tankbottom, (x - 10, y + 20), wheelWidth)
  373.  
  374. pygame.draw.circle(gameDisplay, tankbottom, (x - 15, y + 20), wheelWidth)
  375. pygame.draw.circle(gameDisplay, tankbottom, (x - 10, y + 20), wheelWidth)
  376. pygame.draw.circle(gameDisplay, tankbottom, (x - 5, y + 20), wheelWidth)
  377. pygame.draw.circle(gameDisplay, tankbottom, (x, y + 20), wheelWidth)
  378. pygame.draw.circle(gameDisplay, tankbottom, (x + 5, y + 20), wheelWidth)
  379. pygame.draw.circle(gameDisplay, tankbottom, (x + 10, y + 20), wheelWidth)
  380. pygame.draw.circle(gameDisplay, tankbottom, (x + 15, y + 20), wheelWidth)
  381.  
  382. return possibleTurrets[turPos]
  383.  
  384. def power(level):
  385. text = smallfont.render("Power: " + str(level) + "%", True, wheat)
  386. gameDisplay.blit(text, [display_width / 2, 0])
  387.  
  388. def barrier(xlocation, randomHeight, barrier_width):
  389. pygame.draw.rect(gameDisplay, barriercolor, [xlocation, display_height - randomHeight, barrier_width, randomHeight])
  390.  
  391. def game_over():
  392. game_over = True
  393.  
  394. while game_over:
  395. for event in pygame.event.get():
  396. if event.type == pygame.QUIT:
  397. pygame.quit()
  398. quit()
  399.  
  400. gameDisplay.fill(black)
  401. message_to_screen("Game Over", white, -100, size="large")
  402. message_to_screen("You died.", wheat, -30)
  403.  
  404. button("Play Again", 150, 500, 150, 50, wheat, light_green, action="play")
  405. button("Controls", 350, 500, 100, 50, wheat, light_yellow, action="controls")
  406. button("Quit", 550, 500, 100, 50, wheat, light_red, action="quit")
  407.  
  408. pygame.display.update()
  409.  
  410. clock.tick(15)
  411.  
  412. def you_win():
  413. win = True
  414.  
  415. while win:
  416. for event in pygame.event.get():
  417. if event.type == pygame.QUIT:
  418. pygame.quit()
  419. quit()
  420.  
  421. gameDisplay.fill(black)
  422. message_to_screen("You won!", white, -100, size="large")
  423. message_to_screen("Congratulations!", wheat, -30)
  424.  
  425. button("play Again", 150, 500, 150, 50, wheat, light_green, action="play")
  426. button("controls", 350, 500, 100, 50, wheat, light_yellow, action="controls")
  427. button("quit", 550, 500, 100, 50, wheat, light_red, action="quit")
  428.  
  429. pygame.display.update()
  430.  
  431. clock.tick(15)
  432.  
  433. def gameLoop():
  434. gameExit = False
  435. gameOver = False
  436. FPS = 15
  437.  
  438. player_health = 100
  439. enemy_health = 100
  440.  
  441. barrier_width = 50
  442.  
  443. mainTankX = display_width * 0.9
  444. mainTankY = display_height * 0.9
  445. tankMove = 0
  446. currentTurPos = 0
  447. changeTur = 0
  448.  
  449. enemyTankX = display_width * 0.1
  450. enemyTankY = display_height * 0.9
  451.  
  452. fire_power = 50
  453. power_change = 0
  454.  
  455. xlocation = (display_width / 2) + random.randint(-0.1 * display_width, 0.1 * display_width)
  456. randomHeight = random.randrange(display_height * 0.1, display_height * 0.6)
  457.  
  458. while not gameExit:
  459.  
  460. if gameOver == True:
  461. message_to_screen("Game Over", red, -50, size="large")
  462. message_to_screen("Press C to play again or Q to exit", black, 50)
  463. pygame.display.update()
  464. while gameOver == True:
  465. for event in pygame.event.get():
  466. if event.type == pygame.QUIT:
  467. gameExit = True
  468. gameOver = False
  469.  
  470. if event.type == pygame.KEYDOWN:
  471. if event.key == pygame.K_c:
  472. gameLoop()
  473. elif event.key == pygame.K_q:
  474.  
  475. gameExit = True
  476. gameOver = False
  477.  
  478. for event in pygame.event.get():
  479.  
  480. if event.type == pygame.QUIT:
  481. gameExit = True
  482.  
  483. if event.type == pygame.KEYDOWN:
  484. if event.key == pygame.K_LEFT:
  485. tankMove = -5
  486.  
  487. elif event.key == pygame.K_RIGHT:
  488. tankMove = 5
  489.  
  490. elif event.key == pygame.K_UP:
  491. changeTur = 1
  492.  
  493. elif event.key == pygame.K_DOWN:
  494. changeTur = -1
  495.  
  496. elif event.key == pygame.K_p:
  497. pause()
  498.  
  499. elif event.key == pygame.K_SPACE:
  500.  
  501. damage = fireShell(gun, mainTankX, mainTankY, currentTurPos, fire_power, xlocation, barrier_width,
  502. randomHeight, enemyTankX, enemyTankY)
  503. enemy_health -= damage
  504.  
  505. possibleMovement = ['f', 'r']
  506. moveIndex = random.randrange(0, 2)
  507.  
  508. for x in range(random.randrange(0, 10)):
  509.  
  510. if display_width * 0.3 > enemyTankX > display_width * 0.03:
  511. if possibleMovement[moveIndex] == "f":
  512. enemyTankX += 5
  513. elif possibleMovement[moveIndex] == "r":
  514. enemyTankX -= 5
  515.  
  516. gameDisplay.fill(black)
  517. health_bars(player_health, enemy_health)
  518. gun = tank(mainTankX, mainTankY, currentTurPos)
  519. enemy_gun = enemy_tank(enemyTankX, enemyTankY, 8)
  520. fire_power += power_change
  521.  
  522. power(fire_power)
  523.  
  524. barrier(xlocation, randomHeight, barrier_width)
  525. gameDisplay.fill(base,
  526. rect=[0, display_height - ground_height, display_width, ground_height])
  527. pygame.display.update()
  528.  
  529. clock.tick(FPS)
  530.  
  531. damage = e_fireShell(enemy_gun, enemyTankX, enemyTankY, 8, 50, xlocation, barrier_width,
  532. randomHeight, mainTankX, mainTankY)
  533. player_health -= damage
  534.  
  535. elif event.key == pygame.K_a:
  536. power_change = -1
  537. elif event.key == pygame.K_d:
  538. power_change = 1
  539.  
  540. elif event.type == pygame.KEYUP:
  541. if event.key == pygame.K_LEFT or event.key == pygame.K_RIGHT:
  542. tankMove = 0
  543.  
  544. if event.key == pygame.K_UP or event.key == pygame.K_DOWN:
  545. changeTur = 0
  546.  
  547. if event.key == pygame.K_a or event.key == pygame.K_d:
  548. power_change = 0
  549.  
  550. mainTankX += tankMove
  551.  
  552. currentTurPos += changeTur
  553.  
  554. if currentTurPos > 8:
  555. currentTurPos = 8
  556. elif currentTurPos < 0:
  557. currentTurPos = 0
  558.  
  559. if mainTankX - (tankWidth / 2) < xlocation + barrier_width:
  560. mainTankX += 5
  561.  
  562. gameDisplay.fill(black)
  563. health_bars(player_health, enemy_health)
  564. gun = tank(mainTankX, mainTankY, currentTurPos)
  565. enemy_gun = enemy_tank(enemyTankX, enemyTankY, 8)
  566.  
  567. fire_power += power_change
  568.  
  569. if fire_power > 100:
  570. fire_power = 100
  571. elif fire_power < 1:
  572. fire_power = 1
  573.  
  574. power(fire_power)
  575.  
  576. barrier(xlocation, randomHeight, barrier_width)
  577. gameDisplay.fill(base, rect=[0, display_height - ground_height, display_width, ground_height])
  578. pygame.display.update()
  579.  
  580. if player_health < 1:
  581. game_over()
  582. elif enemy_health < 1:
  583. you_win()
  584. clock.tick(FPS)
  585.  
  586. pygame.quit()
  587. quit()
  588.  
  589.  
  590.  
  591. def button(text, x, y, width, height, inactive_color, active_color, action=None,size=" "):
  592. cur = pygame.mouse.get_pos()
  593. click = pygame.mouse.get_pressed()
  594. # print(click)
  595. if x + width > cur[0] > x and y + height > cur[1] > y:
  596. pygame.draw.rect(gameDisplay, active_color, (x, y, width, height))
  597. if click[0] == 1 and action != None:
  598. if action == "quit":
  599. pygame.quit()
  600. quit()
  601.  
  602. if action == "controls":
  603. game_controls()
  604.  
  605. if action == "play":
  606. gameLoop()
  607.  
  608. if action == "main":
  609. game_intro()
  610.  
  611. else:
  612. pygame.draw.rect(gameDisplay, inactive_color, (x, y, width, height))
  613.  
  614. text_to_button(text, black, x, y, width, height)
  615.  
  616.  
  617. def game_intro():
  618. intro = True
  619.  
  620. while intro:
  621. for event in pygame.event.get():
  622. if event.type == pygame.QUIT:
  623. pygame.quit()
  624. quit()
  625.  
  626. if event.type == pygame.KEYDOWN:
  627. if event.key == pygame.K_c:
  628. intro = False
  629. elif event.key == pygame.K_q:
  630.  
  631. pygame.quit()
  632. quit()
  633. gameDisplay.fill(black)
  634. message_to_screen("Welcome to Tank War!", introcolor, -100, size="large")
  635. message_to_screen("Shoot and destroy the enemy tank", wheat, 15)
  636. message_to_screen("before they destroy you.", wheat, 60)
  637. message_to_screen("The more enemies you destroy, the harder they get.", wheat, 110)
  638.  
  639.  
  640. button("Play", 150, 500, 100, 50, wheat, light_green, action="play",size="vsmall")
  641. button("Controls", 350, 500, 100, 50, wheat, light_yellow, action="controls",size="vsmall")
  642. button("Quit", 550, 500, 100, 50, wheat, light_red, action="quit",size="vsmall")
  643.  
  644. pygame.display.update()
  645. clock.tick(15)
  646.  
  647. game_intro()
  648. gameLoop()
Advertisement
Add Comment
Please, Sign In to add comment