cschaf / battleship-extreme

An Battleship adoption with special rules
4 stars 2 forks source link

Main Loop CLI #29

Closed cschaf closed 9 years ago

cschaf commented 9 years ago

When the game will closed while the gameloop we get this Exception:

Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:862) at java.util.Scanner.next(Scanner.java:1371) at de.hsbremen.battleshipextreme.ConsoleGame.readInteger(Main.java:480) at de.hsbremen.battleshipextreme.ConsoleGame.readIntegerWithMinMax(Main.java:489) at de.hsbremen.battleshipextreme.ConsoleGame.readCoordinates(Main.java:500) at de.hsbremen.battleshipextreme.ConsoleGame.attackManually(Main.java:364) at de.hsbremen.battleshipextreme.ConsoleGame.makePlayerTurn(Main.java:336) at de.hsbremen.battleshipextreme.ConsoleGame.gameLoop(Main.java:292) at de.hsbremen.battleshipextreme.ConsoleGame.(Main.java:37) at de.hsbremen.battleshipextreme.Main.main(Main.java:25) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

cschaf commented 9 years ago

not important anymore