-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
35 lines (26 loc) · 1018 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from game import Game
def main():
# Define the player names
player_names = ["Alice", "Bob", "Charlie"]
# Initialize the game with the players
game = Game(player_names)
while not game.end_game():
# Current player's turn
current_player = game.players[game.turn]
print(f"\n{current_player.name}'s turn:")
# Start the turn for the current player
current_player.start_turn()
# Simulate player actions
# This part would include player decisions for playing cards, buying cards, etc.
# For demonstration purposes, we'll simplify this part
# Example: current_player.play_card(0), current_player.buy_card(some_card)
# End the current player's turn
current_player.end_turn()
# Proceed to the next turn
game.next_turn()
# When the game ends, determine the winner
winner_message = game.get_winner()
print("\nGame Over!")
print(winner_message)
if __name__ == "__main__":
main()