equal
deleted
inserted
replaced
15 handle :: Handle, |
15 handle :: Handle, |
16 nick :: String, |
16 nick :: String, |
17 protocol :: Word16, |
17 protocol :: Word16, |
18 room :: String, |
18 room :: String, |
19 isMaster :: Bool, |
19 isMaster :: Bool, |
|
20 isReady :: Bool, |
20 forceQuit :: Bool |
21 forceQuit :: Bool |
21 } |
22 } |
22 |
23 |
23 instance Eq ClientInfo where |
24 instance Eq ClientInfo where |
24 a1 == a2 = handle a1 == handle a2 |
25 a1 == a2 = handle a1 == handle a2 |
47 roomProto :: Word16, |
48 roomProto :: Word16, |
48 teams :: [TeamInfo], |
49 teams :: [TeamInfo], |
49 gamemap :: String, |
50 gamemap :: String, |
50 gameinprogress :: Bool, |
51 gameinprogress :: Bool, |
51 playersIn :: Int, |
52 playersIn :: Int, |
|
53 readyPlayers :: Int, |
52 params :: Map.Map String [String] |
54 params :: Map.Map String [String] |
53 } |
55 } |
54 createRoom = (RoomInfo "" "" 0 [] "+rnd+" False 1 Map.empty) |
56 createRoom = (RoomInfo "" "" 0 [] "+rnd+" False 1 0 Map.empty) |
55 |
57 |
56 type ClientsTransform = [ClientInfo] -> [ClientInfo] |
58 type ClientsTransform = [ClientInfo] -> [ClientInfo] |
57 type RoomsTransform = [RoomInfo] -> [RoomInfo] |
59 type RoomsTransform = [RoomInfo] -> [RoomInfo] |
58 type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [Handle] |
60 type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [Handle] |
59 type CmdHandler = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [String] -> (ClientsTransform, RoomsTransform, [(HandlesSelector, [String])]) |
61 type CmdHandler = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [String] -> (ClientsTransform, RoomsTransform, [(HandlesSelector, [String])]) |