diff --git a/README.md b/README.md index 7464eaa..661c4d7 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,9 @@ B Go to the shop {2} # Usage Pass a story file as a paramter: -```interactive-storys -- example.story``` +```interactive-storys example.story``` +Help: +```interactive-storys help``` # License GPL-3.0 diff --git a/src/main.rs b/src/main.rs index 2babbe4..40b4b16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,29 @@ fn main() -> io::Result<()> } else if &args[1] == "help" { - println!("Help text here"); + println!("Pass file path of story: + interactive-storys example.story + +Syntax help: + Rules: + - Each line of narrative will begin with a number or group of characters that are the identifier of that line. + - The end of each line will end in curly braces with one or more identifiers within it, these are the refrenced lines. + - If there are more than one reference in a line, that means there is a decision and the user will be prompted to chose one of the options + - If there is only one reference, the program will go straight into that peice of narrative + - Any line that doesn't begin with a number or letter will be ignored, and thus can be treated as a comment + - The first index always begins at '0' + - The order of lines in the syntax does not matter + - If the reference is 'exit' then the program will quit + Example: +# Story Telling + 0 You walk down the road {{A,B}} + 1 You walk around the park and return to the road {{0}} + 2 You are now in the shop the end {{exit}} + +# Choices + A Go to the park {{1}} + B Go to the shop {{2}} + "); } else {