Vendor libs/hump, sfxrlua, json4lua, narrator as real files
These were committed as empty submodule gitlinks with no .gitmodules, so the folders were never populated and the game could not load (require of libs/hump/timer, libs/sfxrlua/sfxr, narrator.narrator). Checked out each at its pinned commit and vendored the files, matching the existing bundled-libs convention. Removed the junk libs/libs/ tree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
e73f63b5d4
commit
03532d29e4
219 changed files with 20254 additions and 252 deletions
60
libs/narrator/test/units/alts-blocks.ink
Normal file
60
libs/narrator/test/units/alts-blocks.ink
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
VAR counter = 1
|
||||
-> casino
|
||||
|
||||
= casino
|
||||
=== { counter }
|
||||
At the table, I drew a card. <>
|
||||
{ stopping:
|
||||
-
|
||||
I entered the casino.
|
||||
- Okay. <>
|
||||
I entered the casino again.
|
||||
- { counter }. <>
|
||||
|
||||
Once more, I went inside.
|
||||
}
|
||||
~ counter++
|
||||
{ counter < 5 : -> casino | -> cycle }
|
||||
|
||||
= cycle
|
||||
=== { counter }
|
||||
{ cycle:
|
||||
- I held my breath.
|
||||
- I waited impatiently.
|
||||
- I paused.
|
||||
}
|
||||
~ counter++
|
||||
{ counter < 9: -> cycle | -> once }
|
||||
|
||||
= once
|
||||
=== { counter }
|
||||
{ once:
|
||||
- Would my luck hold?
|
||||
- Could I win the hand?
|
||||
}
|
||||
~ counter++
|
||||
{ counter < 13 : -> once | -> shuffle }
|
||||
|
||||
= shuffle
|
||||
=== { counter }
|
||||
{ SEED_RANDOM(counter - 13) }
|
||||
At the table, I drew a card. <>
|
||||
{ shuffle:
|
||||
- Ace of Hearts.
|
||||
- King of Spades.
|
||||
- 2 of Diamonds.
|
||||
'You lose this time!' crowed the croupier.
|
||||
}
|
||||
~ counter++
|
||||
{ counter < 16 : -> shuffle | -> nested }
|
||||
|
||||
= nested
|
||||
=== { counter }
|
||||
{ SEED_RANDOM(counter - 16) }
|
||||
{ true:
|
||||
{ shuffle:
|
||||
- Okay. Ace of Hearts again.
|
||||
- Okay. Ace of Hearts?!
|
||||
}
|
||||
}
|
||||
-> END
|
||||
31
libs/narrator/test/units/alts-blocks.txt
Normal file
31
libs/narrator/test/units/alts-blocks.txt
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
=== 1
|
||||
At the table, I drew a card. I entered the casino.
|
||||
=== 2
|
||||
At the table, I drew a card. Okay. I entered the casino again.
|
||||
=== 3
|
||||
At the table, I drew a card. 3. Once more, I went inside.
|
||||
=== 4
|
||||
At the table, I drew a card. 4. Once more, I went inside.
|
||||
=== 5
|
||||
I held my breath.
|
||||
=== 6
|
||||
I waited impatiently.
|
||||
=== 7
|
||||
I paused.
|
||||
=== 8
|
||||
I held my breath.
|
||||
=== 9
|
||||
Would my luck hold?
|
||||
=== 10
|
||||
Could I win the hand?
|
||||
=== 11
|
||||
=== 12
|
||||
=== 13
|
||||
At the table, I drew a card. Ace of Hearts.
|
||||
=== 14
|
||||
At the table, I drew a card. King of Spades.
|
||||
=== 15
|
||||
At the table, I drew a card. 2 of Diamonds.
|
||||
'You lose this time!' crowed the croupier.
|
||||
=== 16
|
||||
Okay. Ace of Hearts again.
|
||||
37
libs/narrator/test/units/alts-inline.ink
Normal file
37
libs/narrator/test/units/alts-inline.ink
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
VAR counter = 0
|
||||
-> coffee
|
||||
|
||||
= coffee
|
||||
{I bought a coffee with my five-pound note.|I bought a second coffee for my friend.|I didn't have enough money to buy any more coffee.}
|
||||
~ counter++
|
||||
{ counter < 4 : -> coffee | -> today }
|
||||
|
||||
= today
|
||||
It was {&Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday} today.
|
||||
~ counter++
|
||||
{ counter < 15 : -> today | -> joke}
|
||||
|
||||
= joke
|
||||
He told me a joke. {!I laughed politely.|I smiled.|I grimaced.|I promised myself to not react again.}
|
||||
~ counter++
|
||||
{ counter < 20 : -> joke | -> coin}
|
||||
|
||||
= coin
|
||||
{ SEED_RANDOM(20 - counter) }
|
||||
I tossed the coin. {~Heads|Tails}.
|
||||
~ counter++
|
||||
{ counter < 22 : -> coin | -> lights}
|
||||
|
||||
= lights
|
||||
I took a step forward. {!||Then the lights went out. -> dark }
|
||||
~ counter++
|
||||
{ counter < 27 : -> lights | -> ratbear}
|
||||
|
||||
= dark
|
||||
So dark...
|
||||
-> ratbear
|
||||
|
||||
= ratbear
|
||||
The Ratbear {&{wastes no time and |}swipes|scratches } {&at you|into your {&leg|arm|cheek}}.
|
||||
~ counter++
|
||||
{ counter < 32 : -> ratbear | -> END }
|
||||
33
libs/narrator/test/units/alts-inline.txt
Normal file
33
libs/narrator/test/units/alts-inline.txt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
I bought a coffee with my five-pound note.
|
||||
I bought a second coffee for my friend.
|
||||
I didn't have enough money to buy any more coffee.
|
||||
I didn't have enough money to buy any more coffee.
|
||||
It was Monday today.
|
||||
It was Tuesday today.
|
||||
It was Wednesday today.
|
||||
It was Thursday today.
|
||||
It was Friday today.
|
||||
It was Saturday today.
|
||||
It was Sunday today.
|
||||
It was Monday today.
|
||||
It was Tuesday today.
|
||||
It was Wednesday today.
|
||||
It was Thursday today.
|
||||
He told me a joke. I laughed politely.
|
||||
He told me a joke. I smiled.
|
||||
He told me a joke. I grimaced.
|
||||
He told me a joke. I promised myself to not react again.
|
||||
He told me a joke.
|
||||
I tossed the coin. Heads.
|
||||
I tossed the coin. Tails.
|
||||
I took a step forward.
|
||||
I took a step forward.
|
||||
I took a step forward. Then the lights went out. So dark...
|
||||
The Ratbear wastes no time and swipes at you.
|
||||
The Ratbear scratches into your leg.
|
||||
The Ratbear swipes at you.
|
||||
The Ratbear scratches into your arm.
|
||||
The Ratbear swipes at you.
|
||||
The Ratbear scratches into your cheek.
|
||||
The Ratbear swipes at you.
|
||||
The Ratbear scratches into your leg.
|
||||
21
libs/narrator/test/units/branching.ink
Normal file
21
libs/narrator/test/units/branching.ink
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-> back_in_london
|
||||
|
||||
=== back_in_london ===
|
||||
|
||||
We arrived into London at 9.45pm exactly.
|
||||
* 'There is not a moment to lose!'[] I declared.
|
||||
-> hurry_outside
|
||||
* 'Monsieur, let us savour this moment!'[] I declared.
|
||||
My master clouted me firmly around the head and dragged me out of the door.
|
||||
-> dragged_outside
|
||||
* [We hurried home] -> hurry_outside
|
||||
|
||||
=== hurry_outside ===
|
||||
We hurried home to Savile Row -> as_fast_as_we_could
|
||||
|
||||
=== dragged_outside ===
|
||||
He insisted that we hurried home to Savile Row
|
||||
-> as_fast_as_we_could
|
||||
|
||||
=== as_fast_as_we_could ===
|
||||
<> as fast as we could.
|
||||
8
libs/narrator/test/units/branching/1.txt
Normal file
8
libs/narrator/test/units/branching/1.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
We arrived into London at 9.45pm exactly.
|
||||
|
||||
>) 'There is not a moment to lose!'
|
||||
2) 'Monsieur, let us savour this moment!'
|
||||
3) We hurried home
|
||||
|
||||
'There is not a moment to lose!' I declared.
|
||||
We hurried home to Savile Row as fast as we could.
|
||||
9
libs/narrator/test/units/branching/2.txt
Normal file
9
libs/narrator/test/units/branching/2.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
We arrived into London at 9.45pm exactly.
|
||||
|
||||
1) 'There is not a moment to lose!'
|
||||
>) 'Monsieur, let us savour this moment!'
|
||||
3) We hurried home
|
||||
|
||||
'Monsieur, let us savour this moment!' I declared.
|
||||
My master clouted me firmly around the head and dragged me out of the door.
|
||||
He insisted that we hurried home to Savile Row as fast as we could.
|
||||
7
libs/narrator/test/units/branching/3.txt
Normal file
7
libs/narrator/test/units/branching/3.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
We arrived into London at 9.45pm exactly.
|
||||
|
||||
1) 'There is not a moment to lose!'
|
||||
2) 'Monsieur, let us savour this moment!'
|
||||
>) We hurried home
|
||||
|
||||
We hurried home to Savile Row as fast as we could.
|
||||
9
libs/narrator/test/units/choices-basic.ink
Normal file
9
libs/narrator/test/units/choices-basic.ink
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"What's that?" my master asked again.
|
||||
* I don't know.
|
||||
Okay...
|
||||
* [Eat answer!]
|
||||
Nice to hear from you!
|
||||
* "I am somewhat tired[."]," I repeated.
|
||||
"Really," he responded. "How deleterious."
|
||||
* "Nothing, Monsieur!"[] I replied.
|
||||
"Very good, then."
|
||||
9
libs/narrator/test/units/choices-basic/1.txt
Normal file
9
libs/narrator/test/units/choices-basic/1.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"What's that?" my master asked again.
|
||||
|
||||
>) I don't know.
|
||||
2) Eat answer!
|
||||
3) "I am somewhat tired."
|
||||
4) "Nothing, Monsieur!"
|
||||
|
||||
I don't know.
|
||||
Okay...
|
||||
8
libs/narrator/test/units/choices-basic/2.txt
Normal file
8
libs/narrator/test/units/choices-basic/2.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
"What's that?" my master asked again.
|
||||
|
||||
1) I don't know.
|
||||
>) Eat answer!
|
||||
3) "I am somewhat tired."
|
||||
4) "Nothing, Monsieur!"
|
||||
|
||||
Nice to hear from you!
|
||||
9
libs/narrator/test/units/choices-basic/3.txt
Normal file
9
libs/narrator/test/units/choices-basic/3.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"What's that?" my master asked again.
|
||||
|
||||
1) I don't know.
|
||||
2) Eat answer!
|
||||
>) "I am somewhat tired."
|
||||
4) "Nothing, Monsieur!"
|
||||
|
||||
"I am somewhat tired," I repeated.
|
||||
"Really," he responded. "How deleterious."
|
||||
9
libs/narrator/test/units/choices-basic/4.txt
Normal file
9
libs/narrator/test/units/choices-basic/4.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"What's that?" my master asked again.
|
||||
|
||||
1) I don't know.
|
||||
2) Eat answer!
|
||||
3) "I am somewhat tired."
|
||||
>) "Nothing, Monsieur!"
|
||||
|
||||
"Nothing, Monsieur!" I replied.
|
||||
"Very good, then."
|
||||
17
libs/narrator/test/units/choices-conditional.ink
Normal file
17
libs/narrator/test/units/choices-conditional.ink
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-> door
|
||||
|
||||
=== door ===
|
||||
* { not france.paris } [Go to Paris] -> france.paris
|
||||
* { not england.london } [Go to London] -> england.london
|
||||
* { france || england } [Go home]
|
||||
Sweet home... -> END
|
||||
|
||||
=== france ===
|
||||
= paris
|
||||
Hello Paris!
|
||||
-> door
|
||||
|
||||
=== england ===
|
||||
= london
|
||||
Hello London!
|
||||
-> door
|
||||
14
libs/narrator/test/units/choices-conditional/1-1-1.txt
Normal file
14
libs/narrator/test/units/choices-conditional/1-1-1.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
>) Go to Paris
|
||||
2) Go to London
|
||||
|
||||
Hello Paris!
|
||||
|
||||
>) Go to London
|
||||
2) Go home
|
||||
|
||||
Hello London!
|
||||
|
||||
>) Go home
|
||||
|
||||
Sweet home...
|
||||
10
libs/narrator/test/units/choices-conditional/1-2.txt
Normal file
10
libs/narrator/test/units/choices-conditional/1-2.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
>) Go to Paris
|
||||
2) Go to London
|
||||
|
||||
Hello Paris!
|
||||
|
||||
1) Go to London
|
||||
>) Go home
|
||||
|
||||
Sweet home...
|
||||
14
libs/narrator/test/units/choices-conditional/2-1-1.txt
Normal file
14
libs/narrator/test/units/choices-conditional/2-1-1.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
1) Go to Paris
|
||||
>) Go to London
|
||||
|
||||
Hello London!
|
||||
|
||||
>) Go to Paris
|
||||
2) Go home
|
||||
|
||||
Hello Paris!
|
||||
|
||||
>) Go home
|
||||
|
||||
Sweet home...
|
||||
10
libs/narrator/test/units/choices-conditional/2-2.txt
Normal file
10
libs/narrator/test/units/choices-conditional/2-2.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
1) Go to Paris
|
||||
>) Go to London
|
||||
|
||||
Hello London!
|
||||
|
||||
1) Go to Paris
|
||||
>) Go home
|
||||
|
||||
Sweet home...
|
||||
10
libs/narrator/test/units/choices-fallback.ink
Normal file
10
libs/narrator/test/units/choices-fallback.ink
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-> find_help
|
||||
|
||||
=== find_help ===
|
||||
|
||||
You search desperately for a friendly face in the crowd.
|
||||
* The woman in the hat[?] pushes you roughly aside. -> find_help
|
||||
* The man with the briefcase[?] looks disgusted as you stumble past him. -> find_help
|
||||
* ->
|
||||
But it is too late: you collapse onto the station platform. This is the end.
|
||||
-> END
|
||||
11
libs/narrator/test/units/choices-fallback/1-1.txt
Normal file
11
libs/narrator/test/units/choices-fallback/1-1.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
You search desperately for a friendly face in the crowd.
|
||||
|
||||
>) The woman in the hat?
|
||||
2) The man with the briefcase?
|
||||
|
||||
The woman in the hat pushes you roughly aside. You search desperately for a friendly face in the crowd.
|
||||
|
||||
>) The man with the briefcase?
|
||||
|
||||
The man with the briefcase looks disgusted as you stumble past him. You search desperately for a friendly face in the crowd.
|
||||
But it is too late: you collapse onto the station platform. This is the end.
|
||||
11
libs/narrator/test/units/choices-fallback/2-1.txt
Normal file
11
libs/narrator/test/units/choices-fallback/2-1.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
You search desperately for a friendly face in the crowd.
|
||||
|
||||
1) The woman in the hat?
|
||||
>) The man with the briefcase?
|
||||
|
||||
The man with the briefcase looks disgusted as you stumble past him. You search desperately for a friendly face in the crowd.
|
||||
|
||||
>) The woman in the hat?
|
||||
|
||||
The woman in the hat pushes you roughly aside. You search desperately for a friendly face in the crowd.
|
||||
But it is too late: you collapse onto the station platform. This is the end.
|
||||
13
libs/narrator/test/units/choices-sticky.ink
Normal file
13
libs/narrator/test/units/choices-sticky.ink
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-> homers_couch
|
||||
|
||||
=== homers_couch ===
|
||||
+ [Eat another donut]
|
||||
You eat another donut. -> fine
|
||||
* [Get off the couch]
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
-> END
|
||||
|
||||
=== fine ===
|
||||
* Ok, is it fine? -> homers_couch
|
||||
* Ok, it's fine! -> homers_couch
|
||||
* -> END
|
||||
24
libs/narrator/test/units/choices-sticky/1-1-1-1-1.txt
Normal file
24
libs/narrator/test/units/choices-sticky/1-1-1-1-1.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, is it fine?
|
||||
2) Ok, it's fine!
|
||||
|
||||
Ok, is it fine?
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, it's fine!
|
||||
|
||||
Ok, it's fine!
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
24
libs/narrator/test/units/choices-sticky/1-1-1-1-2.txt
Normal file
24
libs/narrator/test/units/choices-sticky/1-1-1-1-2.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, is it fine?
|
||||
2) Ok, it's fine!
|
||||
|
||||
Ok, is it fine?
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, it's fine!
|
||||
|
||||
Ok, it's fine!
|
||||
|
||||
1) Eat another donut
|
||||
>) Get off the couch
|
||||
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
15
libs/narrator/test/units/choices-sticky/1-1-2.txt
Normal file
15
libs/narrator/test/units/choices-sticky/1-1-2.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, is it fine?
|
||||
2) Ok, it's fine!
|
||||
|
||||
Ok, is it fine?
|
||||
|
||||
1) Eat another donut
|
||||
>) Get off the couch
|
||||
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
24
libs/narrator/test/units/choices-sticky/1-2-1-1-1.txt
Normal file
24
libs/narrator/test/units/choices-sticky/1-2-1-1-1.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
1) Ok, is it fine?
|
||||
>) Ok, it's fine!
|
||||
|
||||
Ok, it's fine!
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, is it fine?
|
||||
|
||||
Ok, is it fine?
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
24
libs/narrator/test/units/choices-sticky/1-2-1-1-2.txt
Normal file
24
libs/narrator/test/units/choices-sticky/1-2-1-1-2.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
1) Ok, is it fine?
|
||||
>) Ok, it's fine!
|
||||
|
||||
Ok, it's fine!
|
||||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
>) Ok, is it fine?
|
||||
|
||||
Ok, is it fine?
|
||||
|
||||
1) Eat another donut
|
||||
>) Get off the couch
|
||||
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
15
libs/narrator/test/units/choices-sticky/1-2-2.txt
Normal file
15
libs/narrator/test/units/choices-sticky/1-2-2.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
>) Eat another donut
|
||||
2) Get off the couch
|
||||
|
||||
You eat another donut.
|
||||
|
||||
1) Ok, is it fine?
|
||||
>) Ok, it's fine!
|
||||
|
||||
Ok, it's fine!
|
||||
|
||||
1) Eat another donut
|
||||
>) Get off the couch
|
||||
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
5
libs/narrator/test/units/choices-sticky/2.txt
Normal file
5
libs/narrator/test/units/choices-sticky/2.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
1) Eat another donut
|
||||
>) Get off the couch
|
||||
|
||||
You struggle up off the couch to go and compose epic poetry.
|
||||
6
libs/narrator/test/units/choices-tags.ink
Normal file
6
libs/narrator/test/units/choices-tags.ink
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Let's try an experemental feature:
|
||||
The Choice Tags!
|
||||
* Are you seriously? #tag1
|
||||
Yeap, absolutely!
|
||||
* [Eat answer!] #tag2
|
||||
Are you hungry?
|
||||
8
libs/narrator/test/units/choices-tags/1.txt
Normal file
8
libs/narrator/test/units/choices-tags/1.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Let's try an experemental feature:
|
||||
The Choice Tags!
|
||||
|
||||
>) Are you seriously? #tag1
|
||||
2) Eat answer! #tag2
|
||||
|
||||
Are you seriously? #tag1
|
||||
Yeap, absolutely!
|
||||
7
libs/narrator/test/units/choices-tags/2.txt
Normal file
7
libs/narrator/test/units/choices-tags/2.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Let's try an experemental feature:
|
||||
The Choice Tags!
|
||||
|
||||
1) Are you seriously? #tag1
|
||||
>) Eat answer! #tag2
|
||||
|
||||
Are you hungry?
|
||||
7
libs/narrator/test/units/choices-tunnel.ink
Normal file
7
libs/narrator/test/units/choices-tunnel.ink
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
* [Master] ->master-> # test
|
||||
Okay...
|
||||
|
||||
=== master
|
||||
"What's that?" my master asked again.
|
||||
* I don't know.
|
||||
->->
|
||||
9
libs/narrator/test/units/choices-tunnel.txt
Normal file
9
libs/narrator/test/units/choices-tunnel.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
>) Master #test
|
||||
|
||||
"What's that?" my master asked again.
|
||||
|
||||
>) I don't know.
|
||||
|
||||
I don't know.
|
||||
Okay...
|
||||
15
libs/narrator/test/units/comments.ink
Normal file
15
libs/narrator/test/units/comments.ink
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"What do you make of this?" she asked.
|
||||
|
||||
// A simple comment
|
||||
|
||||
"I couldn't possibly comment," I replied. // A simple comment after text
|
||||
|
||||
/*
|
||||
... or an unlimited block of text
|
||||
*/
|
||||
|
||||
Before comment ... /* A comment */ ... and after. Must be in one line, but right now it's known limitation.
|
||||
|
||||
TODO: This TODO will not be printed.
|
||||
|
||||
Text before TODO. TODO: This TODO will be printed.
|
||||
5
libs/narrator/test/units/comments.txt
Normal file
5
libs/narrator/test/units/comments.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"What do you make of this?" she asked.
|
||||
"I couldn't possibly comment," I replied.
|
||||
Before comment ...
|
||||
... and after. Must be in one line, but right now it's known limitation.
|
||||
Text before TODO. TODO: This TODO will be printed.
|
||||
15
libs/narrator/test/units/conditions-inline.ink
Normal file
15
libs/narrator/test/units/conditions-inline.ink
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
VAR mood = 10
|
||||
VAR midnight = true
|
||||
|
||||
-> simple
|
||||
|
||||
=== simple
|
||||
Simple condition: { mood > 20 : Hmm... { mood > 40 : Wow! } I was feeling positive enough. } Okay.
|
||||
~ mood += 20
|
||||
{ mood > 50 : -> complex | -> simple }
|
||||
|
||||
=== complex
|
||||
Complex condition with midnight. { midnight : Wow! { midnight : Nice! | Bad! } | { not midnight : Very nice! | Very bad! } This is the end. }
|
||||
{ midnight != true : -> END }
|
||||
~ midnight = false
|
||||
-> complex
|
||||
5
libs/narrator/test/units/conditions-inline.txt
Normal file
5
libs/narrator/test/units/conditions-inline.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Simple condition: Okay.
|
||||
Simple condition: Hmm... I was feeling positive enough. Okay.
|
||||
Simple condition: Hmm... Wow! I was feeling positive enough. Okay.
|
||||
Complex condition with midnight. Wow! Nice!
|
||||
Complex condition with midnight. Very nice! This is the end.
|
||||
78
libs/narrator/test/units/conditions-switch.ink
Normal file
78
libs/narrator/test/units/conditions-switch.ink
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
VAR foo = false
|
||||
VAR x = 0
|
||||
|
||||
-> simple
|
||||
|
||||
== simple
|
||||
{not foo:
|
||||
Hello!
|
||||
}
|
||||
{ foo :
|
||||
True! -> choice
|
||||
- else:
|
||||
False! }
|
||||
~ foo = not foo
|
||||
-> simple
|
||||
|
||||
=== choice
|
||||
|
||||
{ true :
|
||||
* [Answer] -> nested_inline
|
||||
}
|
||||
|
||||
== nested_inline
|
||||
{
|
||||
- foo : { foo: True! | False! }
|
||||
Text here.
|
||||
- else: Badaboom!
|
||||
...again. -> nested_block
|
||||
}
|
||||
~ foo = not foo
|
||||
-> nested_inline
|
||||
|
||||
|
||||
== nested_block
|
||||
I love you. { true:
|
||||
And what about you?
|
||||
{
|
||||
- false:
|
||||
False!
|
||||
- true:
|
||||
* Choice -> tags
|
||||
}
|
||||
...
|
||||
} Something.
|
||||
|
||||
== tags
|
||||
{
|
||||
- not foo:
|
||||
text { true : x = { x } } #success
|
||||
- else:
|
||||
-> not_a_label
|
||||
}
|
||||
~ foo = not foo
|
||||
-> tags
|
||||
|
||||
== not_a_label
|
||||
{
|
||||
- foo: suc...
|
||||
success #success
|
||||
- x < 0: mid...
|
||||
middle
|
||||
text -> END
|
||||
- else: els...
|
||||
(notLabel) else
|
||||
-> switch
|
||||
}
|
||||
~ foo = not foo
|
||||
-> not_a_label
|
||||
|
||||
== switch
|
||||
{ x:
|
||||
- 0: zero
|
||||
- 1: one
|
||||
- 2: two
|
||||
- else: lots -> END
|
||||
}
|
||||
~ x++
|
||||
-> switch
|
||||
23
libs/narrator/test/units/conditions-switch.txt
Normal file
23
libs/narrator/test/units/conditions-switch.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Hello!
|
||||
False!
|
||||
True!
|
||||
|
||||
>) Answer
|
||||
|
||||
True!
|
||||
Text here.
|
||||
Badaboom!
|
||||
...again. I love you.
|
||||
And what about you?
|
||||
|
||||
>) Choice
|
||||
|
||||
Choice text x = 0 #success
|
||||
suc...
|
||||
success #success
|
||||
els...
|
||||
(notLabel) else
|
||||
zero
|
||||
one
|
||||
two
|
||||
lots
|
||||
26
libs/narrator/test/units/constants.ink
Normal file
26
libs/narrator/test/units/constants.ink
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
CONST STRING_EXAMPLE = "This is the string constant"
|
||||
CONST BOOLEAN_EXAMLPE_TRUE = true
|
||||
CONST BOOLEAN_EXAMLPE_FALSE = false
|
||||
|
||||
CONST LOBBY = 1
|
||||
CONST STAIRCASE = 2
|
||||
CONST HALLWAY = 3
|
||||
CONST HELD_BY_AGENT = -1
|
||||
|
||||
VAR secret_agent_location = LOBBY
|
||||
VAR suitcase_location = HALLWAY
|
||||
|
||||
{ STRING_EXAMPLE }. One is { BOOLEAN_EXAMLPE_TRUE }. Zero is { BOOLEAN_EXAMLPE_FALSE }.
|
||||
|
||||
-> report_progress
|
||||
|
||||
=== report_progress ===
|
||||
{ secret_agent_location == suitcase_location:
|
||||
The secret agent grabs the suitcase!
|
||||
~ suitcase_location = HELD_BY_AGENT
|
||||
|
||||
- secret_agent_location < suitcase_location:
|
||||
The secret agent moves forward.
|
||||
~ secret_agent_location++
|
||||
-> report_progress
|
||||
}
|
||||
4
libs/narrator/test/units/constants.txt
Normal file
4
libs/narrator/test/units/constants.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
This is the string constant. One is 1. Zero is 0.
|
||||
The secret agent moves forward.
|
||||
The secret agent moves forward.
|
||||
The secret agent grabs the suitcase!
|
||||
1
libs/narrator/test/units/escape.ink
Normal file
1
libs/narrator/test/units/escape.ink
Normal file
|
|
@ -0,0 +1 @@
|
|||
The \| dark \{grass\} is soft under your feet.
|
||||
1
libs/narrator/test/units/escape.txt
Normal file
1
libs/narrator/test/units/escape.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
The | dark {grass} is soft under your feet.
|
||||
7
libs/narrator/test/units/expressions.ink
Normal file
7
libs/narrator/test/units/expressions.ink
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
VAR friendly_name_of_player = "Katy"
|
||||
VAR age = "32"
|
||||
VAR dalmatians_count = 101
|
||||
|
||||
My friends call me {friendly_name_of_player}. I'm { age } years old.
|
||||
Wow, 2 x 2 = { 2 * 2 }!
|
||||
I have { dalmatians_count / 101 } dalmatian.
|
||||
3
libs/narrator/test/units/expressions.txt
Normal file
3
libs/narrator/test/units/expressions.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
My friends call me Katy. I'm 32 years old.
|
||||
Wow, 2 x 2 = 4!
|
||||
I have 1 dalmatian.
|
||||
23
libs/narrator/test/units/functions.ink
Normal file
23
libs/narrator/test/units/functions.ink
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{foo(): ->continue}
|
||||
something wrong 1
|
||||
|
||||
-(continue)
|
||||
{boo():
|
||||
something wrong 2
|
||||
}
|
||||
|
||||
sum: {test(2, 3)}
|
||||
|
||||
-> END
|
||||
|
||||
=== function test(a, b) ===
|
||||
first param is {a}
|
||||
second param is {b}
|
||||
~return a + b
|
||||
|
||||
=== function foo() ===
|
||||
~return true
|
||||
|
||||
=== function boo() ===
|
||||
~return
|
||||
|
||||
3
libs/narrator/test/units/functions.txt
Normal file
3
libs/narrator/test/units/functions.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
first param is 2
|
||||
second param is 3
|
||||
sum: 5
|
||||
7
libs/narrator/test/units/gather.ink
Normal file
7
libs/narrator/test/units/gather.ink
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
I looked at Monsieur Fogg
|
||||
* ... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
-
|
||||
we passed the day in silence.
|
||||
-> END
|
||||
8
libs/narrator/test/units/gather.txt
Normal file
8
libs/narrator/test/units/gather.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
we passed the day in silence.
|
||||
3
libs/narrator/test/units/inclusions.ink
Normal file
3
libs/narrator/test/units/inclusions.ink
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
INCLUDE text-line.ink
|
||||
|
||||
A line after a line
|
||||
2
libs/narrator/test/units/inclusions.txt
Normal file
2
libs/narrator/test/units/inclusions.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Hello, world! I am a string.
|
||||
A line after a line
|
||||
13
libs/narrator/test/units/knots.ink
Normal file
13
libs/narrator/test/units/knots.ink
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-> back_in_london
|
||||
|
||||
== back_in_london ===
|
||||
|
||||
We arrived into London at 9.45pm exactly.
|
||||
-> hurry_home
|
||||
|
||||
=== hurry_home =
|
||||
We hurried home to Savile Row -> as_fast_as_we_could
|
||||
|
||||
====== as_fast_as_we_could
|
||||
as fast as we could. -> END
|
||||
|
||||
2
libs/narrator/test/units/knots.txt
Normal file
2
libs/narrator/test/units/knots.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
We arrived into London at 9.45pm exactly.
|
||||
We hurried home to Savile Row as fast as we could.
|
||||
32
libs/narrator/test/units/labels-choices.ink
Normal file
32
libs/narrator/test/units/labels-choices.ink
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-> meet_guard
|
||||
|
||||
=== meet_guard ===
|
||||
The guard frowns at you.
|
||||
|
||||
* (greet) [Greet him]
|
||||
'Greetings.'
|
||||
* (get_out) 'Get out of my way[.'],' you tell the guard.
|
||||
|
||||
- 'Hmm,' replies the guard.
|
||||
|
||||
* {greet} 'Having a nice day?' // only if you greeted him
|
||||
|
||||
* 'Hmm?'[] you reply.
|
||||
|
||||
* {get_out} [Shove him aside] // only if you threatened him
|
||||
You shove him sharply. He stares in reply, and draws his sword!
|
||||
-> fight_guard // this route diverts out of the weave
|
||||
|
||||
- 'Mff,' the guard replies, and then offers you a paper bag. 'Toffee?'
|
||||
|
||||
|
||||
=== fight_guard ===
|
||||
|
||||
-> throw_something
|
||||
|
||||
= throw_something
|
||||
* (rock) [Throw rock at guard] -> throw
|
||||
* (sand) [Throw sand at guard] -> throw
|
||||
|
||||
= throw
|
||||
You hurl {throw_something.rock:a rock|a handful of sand} at the guard.
|
||||
13
libs/narrator/test/units/labels-choices/1-1.txt
Normal file
13
libs/narrator/test/units/labels-choices/1-1.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
The guard frowns at you.
|
||||
|
||||
>) Greet him
|
||||
2) 'Get out of my way.'
|
||||
|
||||
'Greetings.'
|
||||
'Hmm,' replies the guard.
|
||||
|
||||
>) 'Having a nice day?'
|
||||
2) 'Hmm?'
|
||||
|
||||
'Having a nice day?'
|
||||
'Mff,' the guard replies, and then offers you a paper bag. 'Toffee?'
|
||||
13
libs/narrator/test/units/labels-choices/1-2.txt
Normal file
13
libs/narrator/test/units/labels-choices/1-2.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
The guard frowns at you.
|
||||
|
||||
>) Greet him
|
||||
2) 'Get out of my way.'
|
||||
|
||||
'Greetings.'
|
||||
'Hmm,' replies the guard.
|
||||
|
||||
1) 'Having a nice day?'
|
||||
>) 'Hmm?'
|
||||
|
||||
'Hmm?' you reply.
|
||||
'Mff,' the guard replies, and then offers you a paper bag. 'Toffee?'
|
||||
13
libs/narrator/test/units/labels-choices/2-1.txt
Normal file
13
libs/narrator/test/units/labels-choices/2-1.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
The guard frowns at you.
|
||||
|
||||
1) Greet him
|
||||
>) 'Get out of my way.'
|
||||
|
||||
'Get out of my way,' you tell the guard.
|
||||
'Hmm,' replies the guard.
|
||||
|
||||
>) 'Hmm?'
|
||||
2) Shove him aside
|
||||
|
||||
'Hmm?' you reply.
|
||||
'Mff,' the guard replies, and then offers you a paper bag. 'Toffee?'
|
||||
17
libs/narrator/test/units/labels-choices/2-2-1.txt
Normal file
17
libs/narrator/test/units/labels-choices/2-2-1.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
The guard frowns at you.
|
||||
|
||||
1) Greet him
|
||||
>) 'Get out of my way.'
|
||||
|
||||
'Get out of my way,' you tell the guard.
|
||||
'Hmm,' replies the guard.
|
||||
|
||||
1) 'Hmm?'
|
||||
>) Shove him aside
|
||||
|
||||
You shove him sharply. He stares in reply, and draws his sword!
|
||||
|
||||
>) Throw rock at guard
|
||||
2) Throw sand at guard
|
||||
|
||||
You hurl a rock at the guard.
|
||||
17
libs/narrator/test/units/labels-choices/2-2-2.txt
Normal file
17
libs/narrator/test/units/labels-choices/2-2-2.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
The guard frowns at you.
|
||||
|
||||
1) Greet him
|
||||
>) 'Get out of my way.'
|
||||
|
||||
'Get out of my way,' you tell the guard.
|
||||
'Hmm,' replies the guard.
|
||||
|
||||
1) 'Hmm?'
|
||||
>) Shove him aside
|
||||
|
||||
You shove him sharply. He stares in reply, and draws his sword!
|
||||
|
||||
1) Throw rock at guard
|
||||
>) Throw sand at guard
|
||||
|
||||
You hurl a handful of sand at the guard.
|
||||
22
libs/narrator/test/units/labels-nested.ink
Normal file
22
libs/narrator/test/units/labels-nested.ink
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-> dialog_start
|
||||
==dialog_start==
|
||||
|
||||
* [Tell me about the mister]
|
||||
- - (dima)
|
||||
- - His name is Dima.
|
||||
* * {not vika} [Tell me about Vika]
|
||||
-> vika
|
||||
* * [Finish conversation]
|
||||
-> stop_dialog
|
||||
|
||||
* [Tell me about the missis]
|
||||
- - (vika)
|
||||
Her name is Vika.
|
||||
* * {not dima} [Tell me about Dima]
|
||||
-> dima
|
||||
* * [Finish conversation]
|
||||
-> stop_dialog
|
||||
|
||||
==stop_dialog==
|
||||
That's all.
|
||||
-> END
|
||||
14
libs/narrator/test/units/labels-nested/1-1-1.txt
Normal file
14
libs/narrator/test/units/labels-nested/1-1-1.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
>) Tell me about the mister
|
||||
2) Tell me about the missis
|
||||
|
||||
His name is Dima.
|
||||
|
||||
>) Tell me about Vika
|
||||
2) Finish conversation
|
||||
|
||||
Her name is Vika.
|
||||
|
||||
>) Finish conversation
|
||||
|
||||
That's all.
|
||||
10
libs/narrator/test/units/labels-nested/1-2.txt
Normal file
10
libs/narrator/test/units/labels-nested/1-2.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
>) Tell me about the mister
|
||||
2) Tell me about the missis
|
||||
|
||||
His name is Dima.
|
||||
|
||||
1) Tell me about Vika
|
||||
>) Finish conversation
|
||||
|
||||
That's all.
|
||||
14
libs/narrator/test/units/labels-nested/2-1-1.txt
Normal file
14
libs/narrator/test/units/labels-nested/2-1-1.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
1) Tell me about the mister
|
||||
>) Tell me about the missis
|
||||
|
||||
Her name is Vika.
|
||||
|
||||
>) Tell me about Dima
|
||||
2) Finish conversation
|
||||
|
||||
His name is Dima.
|
||||
|
||||
>) Finish conversation
|
||||
|
||||
That's all.
|
||||
10
libs/narrator/test/units/labels-nested/2-2.txt
Normal file
10
libs/narrator/test/units/labels-nested/2-2.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
1) Tell me about the mister
|
||||
>) Tell me about the missis
|
||||
|
||||
Her name is Vika.
|
||||
|
||||
1) Tell me about Dima
|
||||
>) Finish conversation
|
||||
|
||||
That's all.
|
||||
57
libs/narrator/test/units/lists-basic.ink
Normal file
57
libs/narrator/test/units/lists-basic.ink
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
LIST daysOfTheWeek = Monday, Tuesday, Wednesday, Thursday, Friday
|
||||
VAR today = Monday
|
||||
VAR tomorrow = Tuesday
|
||||
|
||||
LIST heatedWaterStates = cold, boiling, recently_boiled
|
||||
VAR kettleState = cold
|
||||
VAR potState = cold
|
||||
|
||||
LIST colours = red, green, blue, purple
|
||||
LIST moods = mad, happy, blue
|
||||
VAR status = colours.blue
|
||||
|
||||
LIST volumeLevel = off, quiet, medium, loud, deafening
|
||||
VAR lecturersVolume = quiet
|
||||
VAR murmurersVolume = quiet
|
||||
|
||||
LIST Numbers = one, two, three
|
||||
VAR cats = one
|
||||
|
||||
~ cats = Numbers(2) // score will be "two"
|
||||
We have { cats } cats.
|
||||
|
||||
-> today
|
||||
== today
|
||||
|
||||
Today is { today }. Tomorrow is { tomorrow }.
|
||||
|
||||
...
|
||||
-> kitchen
|
||||
=== kitchen
|
||||
|
||||
|
||||
- Hm, kettle is { kettleState } and pot is { potState }.
|
||||
~ kettleState = boiling
|
||||
- Now kettle is { kettleState } and pot is { potState }.
|
||||
|
||||
...
|
||||
-> status
|
||||
=== status
|
||||
|
||||
Binary values are { status == colours.blue } and { status == moods.blue }
|
||||
|
||||
...
|
||||
-> lecture
|
||||
=== lecture
|
||||
|
||||
{ lecturersVolume < deafening:
|
||||
~ lecturersVolume++
|
||||
The lecturer's voice becomes {lecturersVolume}.
|
||||
The lecturer has {LIST_VALUE(deafening) - LIST_VALUE(lecturersVolume)} notches still available to him.
|
||||
|
||||
{ lecturersVolume > murmurersVolume:
|
||||
~ murmurersVolume++
|
||||
The murmuring gets louder.
|
||||
}
|
||||
-> lecture
|
||||
}
|
||||
17
libs/narrator/test/units/lists-basic.txt
Normal file
17
libs/narrator/test/units/lists-basic.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
We have two cats.
|
||||
Today is Monday. Tomorrow is Tuesday.
|
||||
...
|
||||
Hm, kettle is cold and pot is cold.
|
||||
Now kettle is boiling and pot is cold.
|
||||
...
|
||||
Binary values are 1 and 0
|
||||
...
|
||||
The lecturer's voice becomes medium.
|
||||
The lecturer has 2 notches still available to him.
|
||||
The murmuring gets louder.
|
||||
The lecturer's voice becomes loud.
|
||||
The lecturer has 1 notches still available to him.
|
||||
The murmuring gets louder.
|
||||
The lecturer's voice becomes deafening.
|
||||
The lecturer has 0 notches still available to him.
|
||||
The murmuring gets louder.
|
||||
66
libs/narrator/test/units/lists-operators.ink
Normal file
66
libs/narrator/test/units/lists-operators.ink
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
LIST DoctorsInSurgery = Adams, Bernard, (Cartwright), Denver, Eamonn
|
||||
|
||||
Cartwright == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery = (Adams, Bernard)
|
||||
Adams, Bernard == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery = ()
|
||||
Empty == { DoctorsInSurgery } Empty
|
||||
|
||||
~ DoctorsInSurgery = DoctorsInSurgery + Adams
|
||||
Adams == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery += Eamonn
|
||||
Adams, Eamonn == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery -= Eamonn
|
||||
Adams == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery += (Eamonn, Denver)
|
||||
Adams, Eamonn, Denver == { DoctorsInSurgery }
|
||||
|
||||
~ DoctorsInSurgery -= (Adams, Eamonn, Denver)
|
||||
Empty == { DoctorsInSurgery } Empty again!
|
||||
|
||||
...
|
||||
~ DoctorsInSurgery = (Adams, Cartwright)
|
||||
{LIST_COUNT(DoctorsInSurgery)} doctors in surgery.
|
||||
First is {LIST_MIN(DoctorsInSurgery)}.
|
||||
Last is {LIST_MAX(DoctorsInSurgery)}.
|
||||
|
||||
Random seed = 1 { SEED_RANDOM(1)}
|
||||
A random doctor: {LIST_RANDOM(DoctorsInSurgery)}
|
||||
|
||||
Working time! { DoctorsInSurgery: The surgery is open today. | Everyone has gone home. }
|
||||
~ DoctorsInSurgery = ()
|
||||
It's to late. { DoctorsInSurgery: The surgery is open today. | Everyone has gone home. }
|
||||
|
||||
~ DoctorsInSurgery = (Adams, Bernard)
|
||||
{ DoctorsInSurgery == (Adams, Bernard):
|
||||
Dr Adams and Dr Bernard are having a loud argument in one corner.
|
||||
}
|
||||
|
||||
{ DoctorsInSurgery ? (Adams, Bernard):
|
||||
Dr Adams and Dr Bernard are having a hushed argument in one corner.
|
||||
}
|
||||
|
||||
~ DoctorsInSurgery += Eamonn
|
||||
|
||||
{ DoctorsInSurgery != (Adams, Bernard):
|
||||
At least Adams and Bernard aren't arguing.
|
||||
}
|
||||
|
||||
{ DoctorsInSurgery has Eamonn:
|
||||
Dr Eamonn is polishing his glasses.
|
||||
}
|
||||
|
||||
{ DoctorsInSurgery !? (Adams, Bernard) : Yeap, Adams and Bernard are outside. | Nope, Adams and Bernard are here. }
|
||||
|
||||
All the doctors ({LIST_COUNT(LIST_ALL(DoctorsInSurgery))}): { LIST_ALL(DoctorsInSurgery) }
|
||||
All the doctors again: { LIST_ALL(Adams) }
|
||||
|
||||
VAR myList = ()
|
||||
~ myList = DoctorsInSurgery()
|
||||
~ myList += Adams
|
||||
{ myList } here!
|
||||
24
libs/narrator/test/units/lists-operators.txt
Normal file
24
libs/narrator/test/units/lists-operators.txt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Cartwright == Cartwright
|
||||
Adams, Bernard == Adams, Bernard
|
||||
Empty == Empty
|
||||
Adams == Adams
|
||||
Adams, Eamonn == Adams, Eamonn
|
||||
Adams == Adams
|
||||
Adams, Eamonn, Denver == Adams, Denver, Eamonn
|
||||
Empty == Empty again!
|
||||
...
|
||||
2 doctors in surgery.
|
||||
First is Adams.
|
||||
Last is Cartwright.
|
||||
Random seed = 1
|
||||
A random doctor: Adams
|
||||
Working time! The surgery is open today.
|
||||
It's to late. Everyone has gone home.
|
||||
Dr Adams and Dr Bernard are having a loud argument in one corner.
|
||||
Dr Adams and Dr Bernard are having a hushed argument in one corner.
|
||||
At least Adams and Bernard aren't arguing.
|
||||
Dr Eamonn is polishing his glasses.
|
||||
Nope, Adams and Bernard are here.
|
||||
All the doctors (5): Adams, Bernard, Cartwright, Denver, Eamonn
|
||||
All the doctors again: Adams, Bernard, Cartwright, Denver, Eamonn
|
||||
Adams here!
|
||||
50
libs/narrator/test/units/lists-queries.ink
Normal file
50
libs/narrator/test/units/lists-queries.ink
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
LIST GuardsOnDuty = (Smith), (Jones), Carter, Braithwaite
|
||||
LIST CoreValues = strength, courage, compassion, greed, nepotism, delusions_of_godhood
|
||||
|
||||
Normal: { GuardsOnDuty }
|
||||
~ GuardsOnDuty = LIST_INVERT(GuardsOnDuty)
|
||||
Inverted: { GuardsOnDuty }
|
||||
|
||||
Range: { LIST_RANGE(GuardsOnDuty, Jones, Carter) }
|
||||
|
||||
...
|
||||
VAR desiredValues = (strength, courage, compassion, nepotism )
|
||||
VAR actualValues = ( greed, nepotism, delusions_of_godhood )
|
||||
{desiredValues ^ actualValues: The new president has at least one desirable quality. A cold {desiredValues ^ actualValues}.}
|
||||
{LIST_COUNT(desiredValues ^ actualValues) == 1: Correction, the new president has only one desirable quality. {desiredValues ^ actualValues == nepotism: It's the scary one.}}
|
||||
|
||||
...
|
||||
LIST Characters = Alfred, Batman, Robin
|
||||
LIST Props = champagne_glass, newspaper
|
||||
|
||||
VAR BallroomContents = (Alfred, Batman, newspaper)
|
||||
VAR HallwayContents = (Robin, champagne_glass)
|
||||
VAR roomState = (Robin, champagne_glass)
|
||||
|
||||
-> room
|
||||
== room
|
||||
{ roomState ? Alfred: Alfred is here, standing quietly in a corner. } { roomState ? Batman: Batman's presence dominates all. } { roomState ? Robin: Robin is all but forgotten. }
|
||||
<> { roomState ? champagne_glass: A champagne glass lies discarded on the floor. } { roomState ? newspaper: On one table, a headline blares out WHO IS THE BATMAN? AND *WHO* IS HIS BARELY-REMEMBERED ASSISTANT? }
|
||||
|
||||
{ roomState == BallroomContents :
|
||||
-> letters
|
||||
- else:
|
||||
~ roomState = BallroomContents
|
||||
-> room
|
||||
}
|
||||
|
||||
== letters
|
||||
LIST Letters = a,b,c
|
||||
LIST Numbers = one, two, three
|
||||
VAR mixedList = (a, three, c)
|
||||
|
||||
...
|
||||
{LIST_ALL(mixedList)} // a, one, b, two, c, three
|
||||
{LIST_COUNT(mixedList)} // 3
|
||||
{LIST_MIN(mixedList)} // a
|
||||
{LIST_MAX(mixedList)} // c
|
||||
{mixedList ? (a,b) } // 0 (false)
|
||||
{mixedList ^ LIST_ALL(a)} // a, c
|
||||
{ mixedList >= (one, a) } // 1 (true)
|
||||
{ mixedList > (three) } // 0 (false)
|
||||
{ LIST_INVERT(mixedList) } // one, b, two
|
||||
19
libs/narrator/test/units/lists-queries.txt
Normal file
19
libs/narrator/test/units/lists-queries.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Normal: Smith, Jones
|
||||
Inverted: Carter, Braithwaite
|
||||
Range: Carter
|
||||
...
|
||||
The new president has at least one desirable quality. A cold nepotism.
|
||||
Correction, the new president has only one desirable quality. It's the scary one.
|
||||
...
|
||||
Robin is all but forgotten. A champagne glass lies discarded on the floor.
|
||||
Alfred is here, standing quietly in a corner. Batman's presence dominates all. On one table, a headline blares out WHO IS THE BATMAN? AND *WHO* IS HIS BARELY-REMEMBERED ASSISTANT?
|
||||
...
|
||||
one, a, two, b, three, c
|
||||
3
|
||||
a
|
||||
c
|
||||
0
|
||||
a, c
|
||||
1
|
||||
0
|
||||
one, two, b
|
||||
17
libs/narrator/test/units/loop.ink
Normal file
17
libs/narrator/test/units/loop.ink
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
- (opts)
|
||||
* 'Can I get a uniform from somewhere?'[] you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
* 'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
* 'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
// We require the player to ask at least one question
|
||||
* {loop} [Enough talking]
|
||||
-> done
|
||||
- (loop)
|
||||
// loop a few times before the guard gets bored
|
||||
{ -> opts | -> opts | }
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
- (done)
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/1-1-1.txt
Normal file
23
libs/narrator/test/units/loop/1-1-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
>) 'Tell me about the security system.'
|
||||
2) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
>) 'Are there dogs?'
|
||||
2) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/1-1-2.txt
Normal file
19
libs/narrator/test/units/loop/1-1-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
>) 'Tell me about the security system.'
|
||||
2) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
1) 'Are there dogs?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/1-2-1.txt
Normal file
23
libs/narrator/test/units/loop/1-2-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
1) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
>) 'Tell me about the security system.'
|
||||
2) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/1-2-2.txt
Normal file
19
libs/narrator/test/units/loop/1-2-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
1) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
1) 'Tell me about the security system.'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
13
libs/narrator/test/units/loop/1-3.txt
Normal file
13
libs/narrator/test/units/loop/1-3.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
1) 'Tell me about the security system.'
|
||||
2) 'Are there dogs?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/2-1-1.txt
Normal file
23
libs/narrator/test/units/loop/2-1-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
>) 'Are there dogs?'
|
||||
2) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/2-1-2.txt
Normal file
19
libs/narrator/test/units/loop/2-1-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
1) 'Are there dogs?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/2-2-1.txt
Normal file
23
libs/narrator/test/units/loop/2-2-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/2-2-2.txt
Normal file
19
libs/narrator/test/units/loop/2-2-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Are there dogs?'
|
||||
3) Enough talking
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
13
libs/narrator/test/units/loop/2-3.txt
Normal file
13
libs/narrator/test/units/loop/2-3.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) 'Are there dogs?'
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Are there dogs?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/3-1-1.txt
Normal file
23
libs/narrator/test/units/loop/3-1-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
>) 'Tell me about the security system.'
|
||||
2) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/3-1-2.txt
Normal file
19
libs/narrator/test/units/loop/3-1-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
3) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
|
||||
1) 'Tell me about the security system.'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
23
libs/narrator/test/units/loop/3-2-1.txt
Normal file
23
libs/narrator/test/units/loop/3-2-1.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
>) 'Can I get a uniform from somewhere?'
|
||||
2) Enough talking
|
||||
|
||||
'Can I get a uniform from somewhere?' you ask the cheerful guard.
|
||||
'Sure. In the locker.' He grins. 'Don't think it'll fit you, though.'
|
||||
He scratches his head.
|
||||
'Well, can't stand around talking all day,' he declares.
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/loop/3-2-2.txt
Normal file
19
libs/narrator/test/units/loop/3-2-2.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) 'Tell me about the security system.'
|
||||
3) Enough talking
|
||||
|
||||
'Tell me about the security system.'
|
||||
'It's ancient,' the guard assures you. 'Old as coal.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
13
libs/narrator/test/units/loop/3-3.txt
Normal file
13
libs/narrator/test/units/loop/3-3.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) 'Are there dogs?'
|
||||
|
||||
'Are there dogs?'
|
||||
'Hundreds,' the guard answers, with a toothy grin. 'Hungry devils, too.'
|
||||
|
||||
1) 'Can I get a uniform from somewhere?'
|
||||
2) 'Tell me about the security system.'
|
||||
>) Enough talking
|
||||
|
||||
You thank the guard, and move away.
|
||||
19
libs/narrator/test/units/nesting.ink
Normal file
19
libs/narrator/test/units/nesting.ink
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
- I looked at Monsieur Fogg
|
||||
* ... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
* * 'A wager!'[] I returned.
|
||||
He nodded.
|
||||
* * * 'But surely that is foolishness!'
|
||||
* * * 'A most serious matter then!'
|
||||
- - - He nodded again.
|
||||
* * * 'But can we win?'
|
||||
'That is what we will endeavour to find out,' he answered.
|
||||
* * * 'A modest wager, I trust?'
|
||||
'Twenty thousand pounds,' he replied, quite flatly.
|
||||
* * * I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <>
|
||||
* * 'Ah[.'],' I replied, uncertain what I thought.
|
||||
- - After that, <>
|
||||
* ... but I said nothing[] and <>
|
||||
- we passed the day in silence.
|
||||
- -> END
|
||||
28
libs/narrator/test/units/nesting/1-1-1-1.txt
Normal file
28
libs/narrator/test/units/nesting/1-1-1-1.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
>) 'But surely that is foolishness!'
|
||||
2) 'A most serious matter then!'
|
||||
|
||||
'But surely that is foolishness!'
|
||||
He nodded again.
|
||||
|
||||
>) 'But can we win?'
|
||||
2) 'A modest wager, I trust?'
|
||||
3) I asked nothing further of him then.
|
||||
|
||||
'But can we win?'
|
||||
'That is what we will endeavour to find out,' he answered.
|
||||
After that, we passed the day in silence.
|
||||
28
libs/narrator/test/units/nesting/1-1-1-2.txt
Normal file
28
libs/narrator/test/units/nesting/1-1-1-2.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
>) 'But surely that is foolishness!'
|
||||
2) 'A most serious matter then!'
|
||||
|
||||
'But surely that is foolishness!'
|
||||
He nodded again.
|
||||
|
||||
1) 'But can we win?'
|
||||
>) 'A modest wager, I trust?'
|
||||
3) I asked nothing further of him then.
|
||||
|
||||
'A modest wager, I trust?'
|
||||
'Twenty thousand pounds,' he replied, quite flatly.
|
||||
After that, we passed the day in silence.
|
||||
26
libs/narrator/test/units/nesting/1-1-1-3.txt
Normal file
26
libs/narrator/test/units/nesting/1-1-1-3.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
>) 'But surely that is foolishness!'
|
||||
2) 'A most serious matter then!'
|
||||
|
||||
'But surely that is foolishness!'
|
||||
He nodded again.
|
||||
|
||||
1) 'But can we win?'
|
||||
2) 'A modest wager, I trust?'
|
||||
>) I asked nothing further of him then.
|
||||
|
||||
I asked nothing further of him then, and after a final, polite cough, he offered nothing more to me. After that, we passed the day in silence.
|
||||
28
libs/narrator/test/units/nesting/1-1-2-1.txt
Normal file
28
libs/narrator/test/units/nesting/1-1-2-1.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
1) 'But surely that is foolishness!'
|
||||
>) 'A most serious matter then!'
|
||||
|
||||
'A most serious matter then!'
|
||||
He nodded again.
|
||||
|
||||
>) 'But can we win?'
|
||||
2) 'A modest wager, I trust?'
|
||||
3) I asked nothing further of him then.
|
||||
|
||||
'But can we win?'
|
||||
'That is what we will endeavour to find out,' he answered.
|
||||
After that, we passed the day in silence.
|
||||
28
libs/narrator/test/units/nesting/1-1-2-2.txt
Normal file
28
libs/narrator/test/units/nesting/1-1-2-2.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
1) 'But surely that is foolishness!'
|
||||
>) 'A most serious matter then!'
|
||||
|
||||
'A most serious matter then!'
|
||||
He nodded again.
|
||||
|
||||
1) 'But can we win?'
|
||||
>) 'A modest wager, I trust?'
|
||||
3) I asked nothing further of him then.
|
||||
|
||||
'A modest wager, I trust?'
|
||||
'Twenty thousand pounds,' he replied, quite flatly.
|
||||
After that, we passed the day in silence.
|
||||
26
libs/narrator/test/units/nesting/1-1-2-3.txt
Normal file
26
libs/narrator/test/units/nesting/1-1-2-3.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
>) 'A wager!'
|
||||
2) 'Ah.'
|
||||
|
||||
'A wager!' I returned.
|
||||
He nodded.
|
||||
|
||||
1) 'But surely that is foolishness!'
|
||||
>) 'A most serious matter then!'
|
||||
|
||||
'A most serious matter then!'
|
||||
He nodded again.
|
||||
|
||||
1) 'But can we win?'
|
||||
2) 'A modest wager, I trust?'
|
||||
>) I asked nothing further of him then.
|
||||
|
||||
I asked nothing further of him then, and after a final, polite cough, he offered nothing more to me. After that, we passed the day in silence.
|
||||
14
libs/narrator/test/units/nesting/1-2.txt
Normal file
14
libs/narrator/test/units/nesting/1-2.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
>) ... and I could contain myself no longer.
|
||||
2) ... but I said nothing
|
||||
|
||||
... and I could contain myself no longer.
|
||||
'What is the purpose of our journey, Monsieur?'
|
||||
'A wager,' he replied.
|
||||
|
||||
1) 'A wager!'
|
||||
>) 'Ah.'
|
||||
|
||||
'Ah,' I replied, uncertain what I thought.
|
||||
After that, we passed the day in silence.
|
||||
6
libs/narrator/test/units/nesting/2.txt
Normal file
6
libs/narrator/test/units/nesting/2.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
I looked at Monsieur Fogg
|
||||
|
||||
1) ... and I could contain myself no longer.
|
||||
>) ... but I said nothing
|
||||
|
||||
... but I said nothing and we passed the day in silence.
|
||||
13
libs/narrator/test/units/queries.ink
Normal file
13
libs/narrator/test/units/queries.ink
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
SEED = 81 { SEED_RANDOM(81) }
|
||||
RANDOM(1, 100) = { RANDOM(1, 100) }
|
||||
POW(2,4) = { POW(2, 4) }
|
||||
INT(1.45) = { INT(1.45) }
|
||||
FLOOR(2.4) = { FLOOR(2.4) }
|
||||
FLOAT(3) = { FLOAT(3) }
|
||||
|
||||
* { CHOICE_COUNT() == 0 } [Choice 1]
|
||||
|
||||
{ "Yes, please." == "Yes, please." : True! | False! }
|
||||
{ "Yes, please." != "Yes, please." : True! | False! }
|
||||
{ "Yes, please" ? "ease" : True! | False! }
|
||||
{ "Yes, please" !? "ease" : True! | False! }
|
||||
13
libs/narrator/test/units/queries.txt
Normal file
13
libs/narrator/test/units/queries.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
SEED = 81
|
||||
RANDOM(1, 100) = 81
|
||||
POW(2,4) = 16
|
||||
INT(1.45) = 1
|
||||
FLOOR(2.4) = 2
|
||||
FLOAT(3) = 3
|
||||
|
||||
>) Choice 1
|
||||
|
||||
True!
|
||||
False!
|
||||
True!
|
||||
False!
|
||||
16
libs/narrator/test/units/stitches.ink
Normal file
16
libs/narrator/test/units/stitches.ink
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
We boarded the train, but where?
|
||||
* [First class] -> the_orient_express.in_first_class
|
||||
* [Travel in the guard's van]
|
||||
-> the_orient_express.in_the_guards_van
|
||||
|
||||
=== the_orient_express ===
|
||||
= in_first_class
|
||||
I settled my master.
|
||||
* [Move to third class]
|
||||
-> in_third_class
|
||||
|
||||
= in_third_class
|
||||
I put myself in third.
|
||||
|
||||
= in_the_guards_van
|
||||
Whoosh..
|
||||
10
libs/narrator/test/units/stitches/1-1.txt
Normal file
10
libs/narrator/test/units/stitches/1-1.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
We boarded the train, but where?
|
||||
|
||||
>) First class
|
||||
2) Travel in the guard's van
|
||||
|
||||
I settled my master.
|
||||
|
||||
>) Move to third class
|
||||
|
||||
I put myself in third.
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue