Code improvement - 3
TextStew » Devlog
Yeah !
Most of the new syntax is functional ! Some tweaks will probably be required, but it fells much more readable and flexible !
#Start #Testing( &First(Hello) , #World , "!!!" ) #Testing(param1, param2, param3) @param1 @param2 @param3 #World world planet earth
Results :
Hello world !!! Hello planet !!! Hello earth !!!
Here is what is going on :
When calling the rule #Start, it will exectute #Testing with 3 parameters. The good stuff is that it is now possible to do some logic on the parameters. Here 3 different things are done :
First parameter : &First(Hello) -> Sets the variable "First" to "Hello", and at the same time returns its new value.
Second parameter : #World -> Executes the rule "world" which returns one of the random lines
Third parameter : "!!!" -> simply returns the string "!!!"
TextStew
A random text generator, and the exploration of Electronic Poetry for space games
Status | In development |
Category | Tool |
Author | vfabien21 |
Tags | Procedural Generation |
More posts
- Code improvement - 4 - tags, and negationAug 12, 2020
- Electronic poetry - round 21 : special planet featuresJul 31, 2020
- Electronic poetry - round 20 : planet descriptionJul 31, 2020
- Electronic poetry - round 19 : planet descriptionsJul 29, 2020
- Electronic poetry - round 18 : early planet descriptionJul 28, 2020
- Electronic Poetry - Round 17 : New syntax !Jul 27, 2020
- Code improvement - 2Jul 25, 2020
- Electronic Poetry - Round 16 : STUCKJul 25, 2020
- Electronic Poetry - Round 15Jul 23, 2020
Leave a comment
Log in with itch.io to leave a comment.