diff --git a/src/__pycache__/Client_connection.cpython-38.pyc b/src/__pycache__/Client_connection.cpython-38.pyc index eb153de..05df422 100644 Binary files a/src/__pycache__/Client_connection.cpython-38.pyc and b/src/__pycache__/Client_connection.cpython-38.pyc differ diff --git a/src/__pycache__/init.cpython-38.pyc b/src/__pycache__/init.cpython-38.pyc index bcdd137..4cbfb6a 100644 Binary files a/src/__pycache__/init.cpython-38.pyc and b/src/__pycache__/init.cpython-38.pyc differ diff --git a/src/__pycache__/socket_client.cpython-38.pyc b/src/__pycache__/socket_client.cpython-38.pyc index c94f9cb..1753250 100644 Binary files a/src/__pycache__/socket_client.cpython-38.pyc and b/src/__pycache__/socket_client.cpython-38.pyc differ diff --git a/src/__pycache__/start_game.cpython-38.pyc b/src/__pycache__/start_game.cpython-38.pyc index 10ce797..3ab0c59 100644 Binary files a/src/__pycache__/start_game.cpython-38.pyc and b/src/__pycache__/start_game.cpython-38.pyc differ diff --git a/src/main.py b/src/main.py index 27a090c..3f0037d 100644 --- a/src/main.py +++ b/src/main.py @@ -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) diff --git a/src/start_game.py b/src/start_game.py index cd8b055..5325d13 100644 --- a/src/start_game.py +++ b/src/start_game.py @@ -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