diff --git a/main.fs b/main.fs index 173e1b4..f998861 100644 --- a/main.fs +++ b/main.fs @@ -33,9 +33,9 @@ create devices 0e f, -1 , \ d/s converts a devices per second value into devices per tick. : d/s 1000e f/ ; -\ the variable "base-devices/tick" is the base amount of devices added per tick. -variable base-devices/tick -0.5e d/s base-devices/tick f! +\ the variable "base-speed" is the base amount of devices added per tick. +variable base-speed +0.5e d/s base-speed f! \ the variable "membercost" is the cost of hiring a new chat member. If it is zero, hiring chat members hasn't been unlocked yet. It has a change flag and is fixed-point. create membercost 0 , 0 , \ the variable "membercount" is how many chat members you've hired. For each chat member, device gain delay decreases. @@ -95,7 +95,7 @@ S" you feel like throwing some stuff into the pool." set-message \ devices/tick calculates the amount of devices that are to be added per tick. : devices/tick ( f: -- r ) - base-devices/tick f@ + base-speed f@ membercount @ s>f 0.5e d/s f* \ each member adds 0.5 d/s constructcount @ s>f 2e d/s f* \ each construct adds 2 d/s f+ f+ ; @@ -117,9 +117,7 @@ S" you feel like throwing some stuff into the pool." set-message \ the word game-tick runs a single tick of the game -: game-tick unlock - update-devices - set-count-message ; +: game-tick unlock update-devices set-count-message ; \ TODO saving \ the word exit-game exits the game. @@ -238,8 +236,11 @@ S" you feel like throwing some stuff into the pool." set-message \ the seconds, minutes and hours words are used with skip-time in debugging. : seconds 1000 * ; +: second seconds ; : minutes seconds 60 * ; +: minute minutes ; : hours minutes 60 * ; +: hour hours ; \ skip-time runs x game ticks without waiting. Used for debugging. : skip-time ( t -- ) 0 do game-tick loop ;