>'LOOK AT COFFEE MAKER': () => { if( State.scene.state.coffeedrunk ) { return "The coffee maker has done its job and mercifully drained the last life out of the old and savaged grounds." } else if( State.scene.state.brewed ) { return "The coffee maker has a fresh pot of what is likely coffee in it." } else if( State.scene.state.brewing ) { return "The coffee maker is brewing." } else if( State.scene.state.waterinmaker ) { return "The coffee maker has fresh water in it, and is ready to brew a terrible cup of coffee." } else { return "Makes coffee. Whodathunk? There's no water in it, and you don't have any fresh coffee, but the grounds already in there have only been used twice and can't be THAT moldy." } }
This is JavaScript right? Is that how these sorts of games are coded? Would learning this be the best way to go about creating games? Thanks.