netserver/Miscutils.hs
changeset 1083 3448dd03483f
parent 1082 596b1dcdc1df
child 1304 05cebf68ebd8
equal deleted inserted replaced
1082:596b1dcdc1df 1083:3448dd03483f
    20 	}
    20 	}
    21 
    21 
    22 instance Eq ClientInfo where
    22 instance Eq ClientInfo where
    23 	a1 == a2 = handle a1 == handle a2
    23 	a1 == a2 = handle a1 == handle a2
    24 
    24 
       
    25 data TeamInfo =
       
    26 	TeamInfo
       
    27 	{
       
    28 		teamname :: String
       
    29 	}
       
    30 
    25 data RoomInfo =
    31 data RoomInfo =
    26 	RoomInfo
    32 	RoomInfo
    27 	{
    33 	{
    28 		name :: String,
    34 		name :: String,
    29 		password :: String
    35 		password :: String,
       
    36 		teams :: [TeamInfo]
    30 	}
    37 	}
    31 
    38 
    32 type ClientsTransform = [ClientInfo] -> [ClientInfo]
    39 type ClientsTransform = [ClientInfo] -> [ClientInfo]
    33 type RoomsTransform = [RoomInfo] -> [RoomInfo]
    40 type RoomsTransform = [RoomInfo] -> [RoomInfo]
    34 type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [Handle]
    41 type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [Handle]