spacetraders-v1 · Mar 15–21, 2021 · v0.2–v0.8 · via commits

Move to XState, automated onboarding, ship trading loop

The week replaced Redux with XState state machines, then used them to automate onboarding and build a full buy, fly and sell trading loop.

Added 13

  • Automated trading loop choosing cargo by profit
  • Flight plan progress indicator with time remaining
  • Locations view with market data
  • Cargo hold display
  • Ship machine that buys fuel automatically
  • Automatic startup loan and cheapest ship purchase
  • Formatted credits display
  • Player machine caching credentials in localStorage
  • Polling API machine with retry timer
  • New account creation with confirm dialog
  • Fetch user credits, ships and loans
  • Buying and selling cargo
  • Flight plans for travel between locations

Changed 7

  • Market data cached to localStorage
  • Tests for ship machine and cargo selection
  • Player initialisation steps through loan, ship and market checks
  • Refresh button only shown when ready
  • State machines moved into a machines folder
  • State management switched from Redux to XState
  • Richer location model

Fixed 2

  • New player button after the XState move
  • Deprecated XState transient transitions