getSnapshot :: State -> ActionM ()
getSnapshot state = do
  isHost <- isLocalhost
  regPlayer <- isJust <$> Players.registeredPlayer state
  if not regPlayer
    then raise "you are not allowed to do that"
    else do
      snap <- liftIO $ Spiel.takeSnapshot state
      json snap
getSnapshot :: State -> ActionM ()
getSnapshot state = do
  isHost <- isLocalhost
  regPlayer <- isJust <$> Players.registeredPlayer state
  if not regPlayer
    then raise "you are not allowed to do that"
    else do
      snap <- liftIO $ Spiel.takeSnapshot state
      json snap
getSnapshot state = do
  isHost <- isLocalhost
  regPlayer <- isJust <$> Players.registeredPlayer state
  if not regPlayer
    then raise "you are not allowed to do that"
    else do
      snap <- liftIO $ Spiel.takeSnapshot state
      json snap