Created
February 19, 2017 22:53
-
-
Save janellbaxter/bab09767f681065f09904d4231b85334 to your computer and use it in GitHub Desktop.
6.1 Restructuring; Programming is Fun: C# Adventure Game (Learn C#)
This file contains 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
/* | |
* 6.1 Restructuring | |
* Example code from Programming is Fun: C# Adventure Game | |
* Learn C# (for beginners) | |
* http://programmingisfun.com/learn/c-sharp-adventure-game | |
*/ | |
using System; | |
namespace Adventure | |
{ | |
public static class Game | |
{ | |
//character name | |
//print out game title and overview | |
//ask player for a name, and save it | |
} | |
class Item {} | |
class Program | |
{ | |
static void Main() | |
{ | |
string CharacterName = "John Doe"; | |
Console.WriteLine("Game Title"); | |
Console.WriteLine("Welcome to ..."); | |
Console.WriteLine("What would you like your character's name to be?"); | |
CharacterName = Console.ReadLine(); | |
Console.WriteLine("Your character is now named " + CharacterName + "!"); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment