gameServer/EngineInteraction.hs
changeset 8479 8d71109b04d2
parent 7766 98edc0724a28
child 8480 42d2565b5700
equal deleted inserted replaced
8478:d12531f09d59 8479:8d71109b04d2
     3 import qualified Data.Set as Set
     3 import qualified Data.Set as Set
     4 import Control.Monad
     4 import Control.Monad
     5 import qualified Codec.Binary.Base64 as Base64
     5 import qualified Codec.Binary.Base64 as Base64
     6 import qualified Data.ByteString.Char8 as B
     6 import qualified Data.ByteString.Char8 as B
     7 import qualified Data.ByteString as BW
     7 import qualified Data.ByteString as BW
       
     8 import qualified Data.Map as Map
     8 -------------
     9 -------------
     9 import CoreTypes
    10 import CoreTypes
    10 
    11 
    11 
    12 
    12 toEngineMsg :: B.ByteString -> B.ByteString
    13 toEngineMsg :: B.ByteString -> B.ByteString
    29                         | otherwise        = (False, False)
    30                         | otherwise        = (False, False)
    30         legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sNpPwtghbc12345" ++ slotMessages
    31         legalMessages = Set.fromList $ "M#+LlRrUuDdZzAaSjJ,sNpPwtghbc12345" ++ slotMessages
    31         slotMessages = "\128\129\130\131\132\133\134\135\136\137\138"
    32         slotMessages = "\128\129\130\131\132\133\134\135\136\137\138"
    32 
    33 
    33 
    34 
    34 gameInfo2Replay :: GameInfo -> B.ByteString
    35 replayToDemo :: [TeamInfo]
    35 gameInfo2Replay GameInfo{roundMsgs = rm,
    36         -> Map.Map B.ByteString B.ByteString
    36         teamsAtStart = teams,
    37         -> Map.Map B.ByteString [B.ByteString]
    37         giMapParams = params1,
    38         -> [B.ByteString]
    38         giParams = params2} = undefined
    39         -> [B.ByteString]
       
    40 replayToDemo teams mapParams params msgs = undefined
       
    41 
       
    42 
       
    43 
       
    44