game logic web service json haskell