mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 15:37:51 -08:00
Fix command input for short input
This commit is contained in:
@@ -60,7 +60,7 @@ namespace SuperStarTrek
|
||||
{
|
||||
var response = GetString("Command");
|
||||
|
||||
if (response != "" &&
|
||||
if (response.Length >= 3 &&
|
||||
Enum.TryParse(response.Substring(0, 3), ignoreCase: true, out Command parsedCommand))
|
||||
{
|
||||
return parsedCommand;
|
||||
|
||||
Reference in New Issue
Block a user