This is how I structured my code for the main menu, I did almost like this first time around so I guess I “cheated” on this one. Guess I tend to over engineer things sometimes…
private static string[] _menuText = {
"=== H4CKsTat10N ===",
"Todays objectives",
"",
"1 Theme park",
"2 Online candy shop",
"3 The Illuminati",
"",
"Select your target:"
};
// Use this for initialization
void Start () {
ShowMainMenu();
}
private void ShowMainMenu()
{
var menuBuilder = buildMenu();
Terminal.WriteLine(menuBuilder.ToString());
}
private StringBuilder buildMenu()
{
var builder = new StringBuilder();
foreach (var item in _menuText)
{
builder.AppendLine(item);
}
return builder;
}