module Web.Antagonist.Server.Data where
import Data.Dynamic
import Game.Antisplice
import Game.Antisplice.Utils.AVL
import Game.Antisplice.Utils.TST
import Game.Antisplice.Monad.Dungeon
import Game.Antisplice.Monad.Vocab
import Text.Chatty.Expansion
import Text.Chatty.Expansion.Vars
import Data.IORef
import Data.Time.Clock
import Yesod
type SessionState = ((((DungeonState,TST Token),AVL (Int,Dynamic)),Int),[(String,EnvVar)])
data SingleUserSub = SingleUserSub { currentCounter :: IORef Int, dungeonStates :: IORef (AVL (Int,SessionState,String,NominalDiffTime)), constructor :: Constructor () }
mkYesodSubData "SingleUserSub" [parseRoutes|
/ PlayR GET
/put PutR POST
/news NewsR POST
|]