Skip to content

Instantly share code, notes, and snippets.

@InDieTasten
Created June 24, 2020 18:32
Show Gist options
  • Save InDieTasten/53c895c7c133be0206070ef7c5cf9837 to your computer and use it in GitHub Desktop.
Save InDieTasten/53c895c7c133be0206070ef7c5cf9837 to your computer and use it in GitHub Desktop.
Interface Design for Textadventure Engine
var game = new TextAdventureGame();
game.AddScene("Start", new Scene
{
TextScenario = "Du stehst am Bahnhof. Was möchtest du tun?",
Options = new SceneOptions[]
{
new SceneOptions
{
Text = "Gehe nach Norden",
NavigatesToScene = "North"
}
}
});
game.AddScene("North", new Scene
{
TextScenario = "Du stehst im Norden. Was möchtest du tun?",
Options = new SceneOptions[]
{
new SceneOptions
{
Text = "Gehe zum Start",
NavigatesToScene = "Start"
}
}
});
game.Launch();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment