gameServer/OfficialServer/checker.hs
changeset 11578 013264e25d71
parent 11509 6a5bdf930edf
child 11606 99966b4a6e1e
child 12840 ad2d448bbcab
equal deleted inserted replaced
11577:bee3a2f8e117 11578:013264e25d71
    81     removeFile fileName
    81     removeFile fileName
    82     where
    82     where
    83         start = flip L.elem ["WINNERS", "DRAW"]
    83         start = flip L.elem ["WINNERS", "DRAW"]
    84         ps ("DRAW" : bs) = "DRAW" : ps bs
    84         ps ("DRAW" : bs) = "DRAW" : ps bs
    85         ps ("WINNERS" : n : bs) = let c = readInt_ n in "WINNERS" : n : take c bs ++ (ps $ drop c bs)
    85         ps ("WINNERS" : n : bs) = let c = readInt_ n in "WINNERS" : n : take c bs ++ (ps $ drop c bs)
       
    86         ps ("GHOST_POINTS" : n : bs) = let c = 2 * (readInt_ n) in "GHOST_POINTS" : n : take c bs ++ (ps $ drop c bs)
    86         ps ("ACHIEVEMENT" : typ : teamname : location : value : bs) =
    87         ps ("ACHIEVEMENT" : typ : teamname : location : value : bs) =
    87             "ACHIEVEMENT" : typ : teamname : location : value : ps bs
    88             "ACHIEVEMENT" : typ : teamname : location : value : ps bs
    88         ps _ = []
    89         ps _ = []
    89 
    90 
    90 checkReplay :: String -> String -> String -> Chan Message -> [B.ByteString] -> IO ()
    91 checkReplay :: String -> String -> String -> Chan Message -> [B.ByteString] -> IO ()