spacetraders-v1 v0.6
Automated onboarding
Added automated onboarding for new players using XState child machines. When a player has no loans, the playerMachine now transitions to a getLoan state that invokes a getLoanMachine. This child machine fetches available loans from the API and automatically requests a startup loan.
Similarly, I created a buyShipMachine that fetches available ships, sorts them by price, and purchases the cheapest one. The playerMachine chains these together - after getting a loan, if the player has no ships, it automatically buys one.
I also added react-number-format to display the player’s credits with proper formatting in the UI. The player’s credits now show with a dollar sign and thousand separators.
More spacetraders-v1
My first implementation against the spacetraders api is an entirely browser-based UI and automation tool · source · play spacetraders-v1 · spacetraders api · posts