starter-snake-haskell-1.1.0: A Haskell Battlesnake starter
Safe HaskellSafe-Inferred
LanguageHaskell2010

Battlesnake.Server

Synopsis

Documentation

type GameRequestHandler a = GameRequest -> IO a Source #

A handler for a battlesnake server request.

runBattlesnakeServer :: IO InfoResponse -> GameRequestHandler () -> GameRequestHandler MoveResponse -> GameRequestHandler () -> IO () Source #

Run a battlesnake server. Runs the server on the port specified by the environment variable PORT or port 3000 if the variable is not set.