This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| =begin | |
| > An interactive novel | |
| > This program parses formatted text files and turns them into an interactive | |
| > novel. Currently, the text files support two types of lines: display lines, or | |
| > lines beginning with a greater than sign. Those lines will be printed out to | |
| > the console. This program also supports prompt lines. These lines will take | |
| > user input and store it in a variable. All other lines are ignored. This file | |
| > can be run as an interactive novel. For completeness, please enter your name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #ifdef WIN32 | |
| #include <windows.h> | |
| #else | |
| // Unix Stuff | |
| #endif | |
| void pause( int time ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| char name[15]; | |
| static void name_prompt( char *buffer, size_t len ); | |
| static void intro(); | |
| int main( void ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| static void name_prompt( char *buffer, size_t len ); | |
| int main( void ) | |
| { | |
| char name[15]; |
NewerOlder