mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 15:16:33 -08:00
Fix action resolution
This commit is contained in:
@@ -13,11 +13,11 @@ internal static class IReadWriteExtensions
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryReadInteger(this IReadWrite io, string prompt, out int value)
|
||||
private static bool TryReadInteger(this IReadWrite io, string prompt, out int intValue)
|
||||
{
|
||||
var floatValue = io.ReadNumber(prompt);
|
||||
value = (int)floatValue;
|
||||
return value == floatValue;
|
||||
intValue = (int)floatValue;
|
||||
return intValue == floatValue;
|
||||
}
|
||||
|
||||
public static Shot? ReadShot(this IReadWrite io, string prompt)
|
||||
|
||||
Reference in New Issue
Block a user