import arcade # Constants SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 SCREEN_TITLE = "Family Journey" class MyGame(arcade.Window): def __init__(self, width, height, title): super().__init__(width, height, title) # We start at the first location self.location = "Restaurant" def on_draw(self): """ Render the screen. """ arcade.start_render() # Display the current location on the screen arcade.draw_text(f"Current Location: {self.location}", 20, SCREEN_HEIGHT - 40, arcade.color.WHITE, 20) # Instructions for the user arcade.draw_text("Press SPACE to move to the next location!", 20, 100, arcade.color.GREEN, 16) def on_key_press(self, key, modifiers): """ Called whenever a key is pressed. """ if key == arcade.key.SPACE: if self.location == "Restaurant": self.location = "Cafe" elif self.location == "Cafe": self.location = "Mall" elif self.location == "Mall": self.location = "Hotel Lobby" elif self.location == "Hotel Lobby": self.location = "Sensory Suite" elif self.location == "Sensory Suite": self.location = "Game Over - The Family is Happy!" # Run the game if __name__ == "__main__": game = MyGame(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) arcade.run()