Describe the bug
When buying/selling/constructing, for the amount, if any digits are included the game treats it as a valid number
To Reproduce
Steps to reproduce the behavior:
Type buy food 1a after passing setup
See error
Expected behavior
It should say Error 1.3.2: Not a valid amount and go to the next day.
Screenshots
Desktop (please complete the following information):
OS: macOS High Sierra 10.13.5
Version: 0.7.1
Java vendor: Oracle
Java version: 1.8.0_131-b11
Stack trace
Exception in thread "main" java.lang.NumberFormatException: For input string: "1a"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at com.samgauck.CityManagement.Command.buy(Command.java:114)
at com.samgauck.CityManagement.Command.execute(Command.java:62)
at com.samgauck.CityManagement.Main.main(Main.java:149)
Describe the bug When buying/selling/constructing, for the amount, if any digits are included the game treats it as a valid number
To Reproduce Steps to reproduce the behavior:
buy food 1a
after passing setupExpected behavior It should say
Error 1.3.2: Not a valid amount
and go to the next day.Screenshots
Desktop (please complete the following information):
Stack trace