File size: 791 Bytes
548394f
 
 
69373e6
548394f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Quick test to check dice logging"""

from pycatan import Game, GameManager, HumanUser, WebVisualization, ConsoleVisualization
from pycatan.management.actions import ActionType, Action

# Create a simple game
users = [HumanUser("Alice"), HumanUser("Bob"), HumanUser("Charlie")]
viz = ConsoleVisualization(use_colors=False)
manager = GameManager(users, [viz])

# Start game
manager.start_game()

# Create a roll dice action
action = Action(
    action_type=ActionType.ROLL_DICE,
    player_id=0,
    parameters={}
)

# Execute it
result = manager.execute_action(action)

print("\n=== Action Parameters After Execution ===")
print(f"Parameters: {action.parameters}")
print(f"Dice: {action.parameters.get('dice', 'NOT FOUND')}")
print(f"Total: {action.parameters.get('total', 'NOT FOUND')}")