You have $widgets widgets and $frobs frobs. You have $money dollars. (set: $widgetPrice to (random: 1,6)) (set: $frobPrice to (random: 1,6)) The price of widgets is $widgetPrice. The price of frobs is $frobPrice. (if: $widgets > 0) [ [[Sell a widget]] ] (if: $money >= $widgetPrice) [ [[Buy a widget]] ] (if: $frobs > 0) [ [[Sell a frob]] ] (if: $money >= $frobPrice) [ [[Buy a frob]] ](set: $widgets to 5) (set: $frobs to 3) (set: $money to 100) Welcome to the widget & frob trading game. [[Go to the marketplace->marketplace]] (set: $widgets to $widgets - 1) (set: $money to $money + $widgetPrice) One widget sold. [[Go back to marketplace->marketplace]] (set: $widgets to $widgets + 1) (set: $money to $money - $widgetPrice) One widget bought. [[Go back to marketplace->marketplace]] (set: $frobs to $frobs - 1) (set: $money to $money + $frobPrice) One frob sold. [[Go back to marketplace->marketplace]] (set: $frobs to $frobs + 1) (set: $money to $money - $frobPrice) One frob bought. [[Go back to marketplace->marketplace]]