summaryrefslogtreecommitdiff
path: root/haskell/app
diff options
context:
space:
mode:
authorJulien Dessaux2023-07-29 00:32:36 +0200
committerJulien Dessaux2023-07-29 00:32:36 +0200
commit961625c363193905e58221bdc895a19f9f153cce (patch)
tree173f8f284b68be4046f8ef22db654195bfcd7da2 /haskell/app
parent[haskell] implemented ships's availability tracking in the database (diff)
downloadspacetraders-961625c363193905e58221bdc895a19f9f153cce.tar.gz
spacetraders-961625c363193905e58221bdc895a19f9f153cce.tar.bz2
spacetraders-961625c363193905e58221bdc895a19f9f153cce.zip
[haskell] implemented dock and orbit api calls
Diffstat (limited to '')
-rw-r--r--haskell/app/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/haskell/app/Main.hs b/haskell/app/Main.hs
index 85b07da..a7774e5 100644
--- a/haskell/app/Main.hs
+++ b/haskell/app/Main.hs
@@ -9,6 +9,7 @@ import System.Posix.Process
import SpaceTraders
import SpaceTraders.Automation.Init
import SpaceTraders.APIClient.Errors
+import SpaceTraders.APIClient.Ships
import SpaceTraders.APIClient.Systems
import SpaceTraders.Database.Agents
import SpaceTraders.Database.Contracts
@@ -28,5 +29,7 @@ main = do
Left e -> throwIO e
Right s' -> print $ length s'
runSpaceTradersT getContracts env >>= print
- runSpaceTradersT getShips env >>= print
+ ss <- runSpaceTradersT getShips env
+ runSpaceTradersT (dock $ head ss) env >>= print
+ runSpaceTradersT (orbit $ head ss) env >>= print
deinitST env