-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (26 loc) · 804 Bytes
/
main.py
File metadata and controls
31 lines (26 loc) · 804 Bytes
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
from src.engine.engine import Engine
from src.engine.utils.enums import Player, Phase
from src.server.models import RoomManager, Room, User
# engine = Engine()
# print(engine.board)
# print(engine.board[1])
# print(engine.place_goat(1,role=Player.GOAT.value))
# print(engine.board)
# print(engine.turn)
# print(engine.goats_placed)
# print(engine.move_tiger(0,2,role=Player.TIGER.value))
# print(engine.board)
# print(engine.goats_captured)
# print(engine.history)
# print("==")
# print(engine.get_state())
room_manager = RoomManager()
room = room_manager.find_or_create_room()
print(room.room_id)
room.add_user("sid1")
room.add_user("sid2")
room.add_user("sid3")
print(len(room.users))
room = room_manager.rooms.get(room.room_id)
print(room.details)
print(room.chat)