package pw.scho.battleship.model;

public class GameException extends RuntimeException {

    private GameRuntimeExceptionKind kind;

    private GameException(GameRuntimeExceptionKind kind) {
        super(kind.toString());
        this.kind = kind;
    }

    public static GameException CreateShipNotPlaceable() {
        return new GameException(GameRuntimeExceptionKind.SHIP_NOT_PLACEABLE);
    }

    public static GameException CreateAlreadyShotAt() {
        return new GameException(GameRuntimeExceptionKind.ALREADY_SHOT_AT);
    }

    public static GameException CreateShotTwice() {
        return new GameException(GameRuntimeExceptionKind.SHOT_TWICE);
    }

    private enum GameRuntimeExceptionKind {
        SHIP_NOT_PLACEABLE,
        ALREADY_SHOT_AT,
        SHOT_TWICE;
    }
}

@@ -577,17 +577,22 @@
 eate
-ShotTwice
+NotPlayersTurn
 () %7B
@@ -650,26 +650,32 @@
 ionKind.
-SHOT_TWICE
+NOT_PLAYERS_TURN
 );%0A    %7D
@@ -785,18 +785,24 @@
     
-SHOT_TWICE
+NOT_PLAYERS_TURN
 ;%0A  

Rename game exception