equal
deleted
inserted
replaced
59 difficulty :: Int, |
59 difficulty :: Int, |
60 hhnum :: Int, |
60 hhnum :: Int, |
61 hedgehogs :: [HedgehogInfo] |
61 hedgehogs :: [HedgehogInfo] |
62 } |
62 } |
63 |
63 |
|
64 instance Show TeamInfo where |
|
65 show ti = "owner: " ++ (teamowner ti) |
|
66 ++ "name: " ++ (teamname ti) |
|
67 ++ "color: " ++ (teamcolor ti) |
|
68 |
64 data RoomInfo = |
69 data RoomInfo = |
65 RoomInfo |
70 RoomInfo |
66 { |
71 { |
67 roomUID :: !Int, |
72 roomUID :: !Int, |
68 masterID :: !Int, |
73 masterID :: !Int, |
85 instance Show RoomInfo where |
90 instance Show RoomInfo where |
86 show ri = show (roomUID ri) |
91 show ri = show (roomUID ri) |
87 ++ ", players ids: " ++ show (IntSet.size $ playersIDs ri) |
92 ++ ", players ids: " ++ show (IntSet.size $ playersIDs ri) |
88 ++ ", players: " ++ show (playersIn ri) |
93 ++ ", players: " ++ show (playersIn ri) |
89 ++ ", ready: " ++ show (readyPlayers ri) |
94 ++ ", ready: " ++ show (readyPlayers ri) |
|
95 ++ ", teams: " ++ show (teams ri) |
90 |
96 |
91 instance Eq RoomInfo where |
97 instance Eq RoomInfo where |
92 (==) = (==) `on` roomUID |
98 (==) = (==) `on` roomUID |
93 |
99 |
94 newRoom = ( |
100 newRoom = ( |