summaryrefslogtreecommitdiff
path: root/haskell/app/Main.hs
blob: edd84cc4c36801cae2cff8674b30ed04b44b06a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import SpaceTraders
import SpaceTraders.Automation.Init
import SpaceTraders.APIClient.Ships
import SpaceTraders.APIClient.Systems

main :: IO ()
main = do
  env <- initST
  runSpaceTradersT main' env
  deinitST env
  where
    main' :: SpaceTradersT ()
    main' = do
      _ <- initSystems
      (Right ships) <- myShips -- work around to fetch the initial probe
      _ <- orbit (head ships)
      return ()