Package server.common

Examples of server.common.GameException


        Message response = loadPlay(pl_id, ga_id);
        switch (response.getHeader()) {
            case Message.LOAD_GAME_SUCCESS:
                return response;
            case Message.LOAD_GAME_ERROR:
                throw new GameException(GameException.typeErr.LOAD_GAME_ERROR);
            case Message.PLAYER_NOT_LOGGED:
                throw new GameException(GameException.typeErr.PLAYER_NOT_LOGGED);
            case Message.XML_FILE_NOT_EXISTS:
                throw new GameException(GameException.typeErr.XML_FILE_NOT_EXISTS);
        }
        return null;
    }
View Full Code Here


        Message response = savePlay(type, pl_id, ga_id, ga_infos);
        switch (response.getHeader()) {
            case Message.SAVE_GAME_SUCCESS:
                return response;
            case Message.SAVE_GAME_ERROR:
                throw new GameException(GameException.typeErr.LOAD_GAME_ERROR);
            case Message.GAME_IDENT_ERROR:
                throw new GameException(GameException.typeErr.GAME_IDENT_ERROR);
        }
        return null;
    }
View Full Code Here

            case Message.PLACE_WORD_SUCCESS:
                return response;
            case Message.PLACE_WORD_ERROR:
                return response;
            case Message.GAME_IDENT_ERROR:
                throw new GameException(GameException.typeErr.GAME_IDENT_ERROR);
        }
        return null;
    }
View Full Code Here

        Message response = destroyAnonym(pl_id);
        switch (response.getHeader()) {
            case Message.DELETE_ANONYM_SUCCESS:
                return response;
            case Message.DELETE_ANONYM_ERROR:
                throw new GameException(GameException.typeErr.DELETE_ANONYM_ERROR);
        }
        return null;
    }
View Full Code Here

        Message response = tileExchange(pl_id, position);
        switch (response.getHeader()) {
            case Message.TILE_EXCHANGE_SUCCES:
                return response;
            case Message.TILE_EXCHANGE_ERROR:
                throw new GameException(GameException.typeErr.TILE_EXCHANGE_ERROR);
        }
        return null;
    }
View Full Code Here

        Message response = tileSwitch(pl_id, position);
        switch (response.getHeader()) {
            case Message.TILE_SWITCH_SUCCES:
                return response;
            case Message.TILE_SWITCH_ERROR:
                throw new GameException(GameException.typeErr.TILE_EXCHANGE_ERROR);
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of server.common.GameException

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.