Untitled
unknown
plain_text
2 years ago
756 B
5
Indexable
private void HandleUserInput()
{
while (true)
{
io.WriteLine("Select an option:");
io.WriteLine("1. Play");
io.WriteLine("2. Clear Player Data");
io.WriteLine("3. Exit");
string choice = io.ReadLine();
switch (choice)
{
case "1":
Play();
break;
case "2":
playerDataStorage.ClearData();
io.WriteLine("Player data cleared.");
break;
case "3":
io.WriteLine("Exiting the game...");
return;
default:
io.WriteLine("Invalid option. Please try again.");
break;
}
}
}Editor is loading...