This commit is contained in:
Nico 2021-04-27 19:05:29 +01:00
parent 07ad405461
commit 955ad5c8e1
2 changed files with 11 additions and 19 deletions

View File

@ -20,24 +20,13 @@ like https://candybox2.github.io/
* can only be bought once
* batteries
* when bought, immediately gives 1 energy
* water generator
* costs N devices and 1 spoon (always one)
* lore: the spoon controls the water flowing through the generator,
which allows it to power a turbine and produce energy
* could implement the notion of a moon phase to make the spoons
stronger and cause higher energy production?
* oxygen bottles
* for extra oxygen while swimming in the pool
* oracle
* costs 3 billion devices
* ends the game with a thank you note from sun microsystems
## the garden
* you can move around the garden with the arrow keys
* you can use the detector in the garden for 1 energy
* you might find a moon rune moonsoon spoon with the detector
* you can find bells and whistles
* You can metal detect on a timer
## the pool

17
main.fs
View File

@ -213,7 +213,10 @@ S" you feel like throwing some stuff into the pool." set-message
endcase ;
\ the word garden-input contains the input cases specifically for the garden
: garden-input ; \ TODO stub
: garden-input
case
[char] m of S" this is a test" set-message endof
endcase ; \ TODO stub
\ the word handle-input handles input every time around the game loop.
: handle-input
@ -256,10 +259,10 @@ S" you feel like throwing some stuff into the pool." set-message
\ draw-tab draws a single tab for a screen
: draw-tab ( i -- )
dup screen @ = if
." >" bl
drop then draw-screen-name ;
." >" bl drop then draw-screen-name ;
\ draw-tab-bar draws the tab bar. TODO make this into smaller words
\ draw-tab-bar draws the tab bar
\ TODO keep side indent thing
: draw-tab-bar ( x y -- x y )
2dup at-xy
clear-line
@ -333,11 +336,11 @@ S" you feel like throwing some stuff into the pool." set-message
\ draw-devices-screen redraws the devices screen, but only if there's been a change.
\ ( x y -- x y )
: draw-devices-screen draw-message draw-devices draw-blank draw-actions ;
: draw-devices-screen 2dup at-xy draw-devices draw-blank draw-actions ;
\ : draw-screen clear-all ;
\ TODO draw the garden, this is a stub
: draw-garden ( x y -- x y ) 2dup at-xy ." hi " ;
: draw-garden ( x y -- x y ) 2dup at-xy draw-blank ." hi " ;
\ TODO apparently the forth-y way to do this is with a function table
: draw-screen
@ -351,7 +354,7 @@ S" you feel like throwing some stuff into the pool." set-message
begin
wait-tick game-tick handle-input
any-change? if
1 1 draw-tab-bar draw-blank draw-screen clear-xy clear-all
1 1 draw-tab-bar draw-message draw-blank draw-screen clear-xy clear-all
then
0 until ;