summaryrefslogtreecommitdiff
path: root/haskell/app
diff options
context:
space:
mode:
authorJulien Dessaux2024-03-22 01:13:34 +0100
committerJulien Dessaux2024-03-27 15:21:37 +0100
commit7e27a0a7eada373780a9757fd89f70d4d911d69a (patch)
tree8b660bde99d5f9b4ae4f9e9caea4b51f19931dbe /haskell/app
parent[node] begin the great typescript rewrite (diff)
downloadspacetraders-7e27a0a7eada373780a9757fd89f70d4d911d69a.tar.gz
spacetraders-7e27a0a7eada373780a9757fd89f70d4d911d69a.tar.bz2
spacetraders-7e27a0a7eada373780a9757fd89f70d4d911d69a.zip
[haskell] refactoring
Diffstat (limited to '')
-rw-r--r--haskell/app/Main.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/haskell/app/Main.hs b/haskell/app/Main.hs
index edd84cc..839e6cf 100644
--- a/haskell/app/Main.hs
+++ b/haskell/app/Main.hs
@@ -1,11 +1,10 @@
-{-# LANGUAGE OverloadedStrings #-}
-
module Main (main) where
-import SpaceTraders
-import SpaceTraders.Automation.Init
-import SpaceTraders.APIClient.Ships
-import SpaceTraders.APIClient.Systems
+import SpaceTraders
+import SpaceTraders.APIClient.Agent
+import SpaceTraders.APIClient.Contracts
+import SpaceTraders.APIClient.Ships
+import SpaceTraders.Automation.Init
main :: IO ()
main = do
@@ -15,7 +14,11 @@ main = do
where
main' :: SpaceTradersT ()
main' = do
- _ <- initSystems
+ -- refresh our core objects
+ _ <- myAgent
+ _ <- myContracts
(Right ships) <- myShips -- work around to fetch the initial probe
- _ <- orbit (head ships)
+ let cmdShip = head ships
+ (Right t) <- orbit cmdShip
+ liftIO $ print t
return ()