develop
huangjielun 3 years ago committed by Mix
parent b237cffa60
commit 077f6f4d34

@ -1716,6 +1716,8 @@ def main():
demo = 0
elif game_status == 2:
demo = 1
elif game_status == 3:
demo = 2
run = True
clock = pygame.time.Clock()
font = pygame.font.SysFont('kaiti',40)

@ -59,11 +59,13 @@ def starting_screen():
play_button = Button('Single Play!', WHITE, None, 350, centered_x=True)
Oplay_button = Button('Online Play!', WHITE, None, 400, centered_x=True)
exit_button = Button('Exit!', WHITE, None, 450, centered_x=True)
AIplay_button = Button('AI Play!', WHITE, None, 450, centered_x=True)
exit_button = Button('Exit!', WHITE, None, 500, centered_x=True)
play_button.display()
Oplay_button.display()
exit_button.display()
AIplay_button.display()
pygame.display.update()
@ -79,13 +81,19 @@ def starting_screen():
else:
Oplay_button = Button('Online Play!', WHITE, None, 400, centered_x=True)
if AIplay_button.check_click(pygame.mouse.get_pos()):
AIplay_button = Button('AI Play!', RED, None, 450, centered_x=True)
else:
AIplay_button = Button('AI Play!', WHITE, None, 450, centered_x=True)
if exit_button.check_click(pygame.mouse.get_pos()):
exit_button = Button('Exit!', RED, None, 450, centered_x=True)
exit_button = Button('Exit!', RED, None, 500, centered_x=True)
else:
exit_button = Button('Exit!', WHITE, None, 450, centered_x=True)
exit_button = Button('Exit!', WHITE, None, 500, centered_x=True)
play_button.display()
Oplay_button.display()
AIplay_button.display()
exit_button.display()
pygame.display.update()
@ -98,6 +106,8 @@ def starting_screen():
return 1
if Oplay_button.check_click(pygame.mouse.get_pos()):
return 2
if AIplay_button.check_click(pygame.mouse.get_pos()):
return 3
if exit_button.check_click(pygame.mouse.get_pos()):
return 0

Loading…
Cancel
Save