Package eu.semberal.migmang.exceptions

Examples of eu.semberal.migmang.exceptions.BadSaveGameException


            int counter = 1;
            gameStatus = new GameStatus(loadedGame.getWhitePlayerType(), loadedGame.getBlackPlayerType(), loadedGame.getWhiteDifficulty(), loadedGame.getBlackDifficulty(), view, view);
            for (Move move : loadedGame.getMoveHistory()) {
                if (move.getCapturedIndexes().length != 0
                        || !Referee.isValidMove(gameStatus.getCurrentBoard(), move, gameStatus.isWhiteOnTurn())) {
                    throw new BadSaveGameException();
                }
                Referee.addCaptureInformationToMove(gameStatus.getCurrentBoard(), move);
                gameStatus.getCurrentBoard().addMoveWithCaptures(move);
                gameStatus.addMove(move);
                gameStatus.setWhiteOnTurn(!gameStatus.isWhiteOnTurn());
View Full Code Here

TOP

Related Classes of eu.semberal.migmang.exceptions.BadSaveGameException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.