gameServer/CoreTypes.hs
changeset 3425 ead2ed20dfd4
parent 3300 4adaad1d5027
child 3435 4e4f88a7bdf2
equal deleted inserted replaced
3424:5543340db663 3425:ead2ed20dfd4
    10 import Data.Sequence(Seq, empty)
    10 import Data.Sequence(Seq, empty)
    11 import Data.Time
    11 import Data.Time
    12 import Network
    12 import Network
    13 import Data.Function
    13 import Data.Function
    14 
    14 
       
    15 import RoomsAndClients
    15 
    16 
    16 data ClientInfo =
    17 data ClientInfo =
    17     ClientInfo
    18     ClientInfo
    18     {
    19     {
    19         clientUID :: !Int,
    20         clientUID :: !Int,
   175     Accept ClientInfo
   176     Accept ClientInfo
   176     | ClientMessage (Int, [String])
   177     | ClientMessage (Int, [String])
   177     | ClientAccountInfo (Int, AccountInfo)
   178     | ClientAccountInfo (Int, AccountInfo)
   178     | TimerAction Int
   179     | TimerAction Int
   179 
   180 
   180 type Clients = IntMap.IntMap ClientInfo
   181 type MRnC = MRoomsAndClients RoomInfo ClientInfo
   181 type Rooms = IntMap.IntMap RoomInfo
   182 type IRnC = IRoomsAndClients RoomInfo ClientInfo
   182 
   183 
   183 --type ClientsTransform = [ClientInfo] -> [ClientInfo]
   184 --type ClientsTransform = [ClientInfo] -> [ClientInfo]
   184 --type RoomsTransform = [RoomInfo] -> [RoomInfo]
   185 --type RoomsTransform = [RoomInfo] -> [RoomInfo]
   185 --type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [ClientInfo]
   186 --type HandlesSelector = ClientInfo -> [ClientInfo] -> [RoomInfo] -> [ClientInfo]
   186 --type Answer = ServerInfo -> (HandlesSelector, [String])
   187 --type Answer = ServerInfo -> (HandlesSelector, [String])
   187 
   188 
   188 type ClientsSelector = Clients -> Rooms -> [Int]
   189 --type ClientsSelector = Clients -> Rooms -> [Int]