Package server.common

Examples of server.common.Message


     * @param pl_name
     * @param pl_pwd
     * @return the player UUID
     */
    public synchronized Message newAccount(String pl_name, String pl_pwd) {
        Message response = null;
        try {
            // Try to create a new player acount
            response = game.newAccount(pl_name, pl_pwd);
            if (response == null) {
                throw new GameException(GameException.typeErr.SYSKO);
View Full Code Here


     * @param pl_name
     * @param pl_pwd
     * @return the player UUID
     */
    public synchronized Message login(String pl_name, String pl_pwd) {
        Message response = null;
        try {
            // Try to log the current player
            response = game.login(pl_name, pl_pwd);

            if (response == null) {
View Full Code Here

     *
     * @param pl_id
     * @return
     */
    public synchronized Message logout(String pl_id) {
        Message response = null;
        try {
            // Try to log the current player
            response = game.logout(pl_id);

            if (response == null) {
View Full Code Here

     *
     * @param playerID
     * @return the new playID and the formatedRack.
     */
    public synchronized Message createNewPlay(String playerID) {
        Message response = null;
        try {
            // Try to create a new game for the current player
            response = game.createNewPlay(playerID);

            if (response == null) {
View Full Code Here

     *
     * @param pl_id
     * @return status
     */
    public synchronized Message newAnonymGame(String pl_id) {
        Message response = null;
        try {
            // Try to create a new game for the current anonymous player
            response = game.createNewAnonymPlay(pl_id);

            if (response == null) {
View Full Code Here

     *
     * @param playerID
     * @return a formated list of plays for this player.
     */
    public synchronized Message loadPlayList(String playerID) {
        Message response = null;
        try {
            // Try to load the plays list for the current player
            response = game.loadPlayList(playerID);

            if (response == null) {
View Full Code Here

     * @param playerID
     * @param playID
     * @return a formated list of word in JSON and a formatedRack.
     */
    public synchronized Message loadGame(String playerID, String playID) {
        Message response = null;
        try {
            // Try to load an existed play for the current player
            response = game.loadSavedPlay(playerID, playID);

            if (response == null) {
View Full Code Here

        }
        return response;
    }

    public synchronized Message saveGame(int type, String playerID, String playID, String ga_infos) {
        Message response = null;
        try {
            // Try to save current play for the current player
            response = game.SavePlay(type, playerID, playID, ga_infos);

            if (response == null) {
View Full Code Here

     *
     * @param playerID
     * @return status
     */
    public synchronized Message deleteAnonym(String playerID) {
        Message response = null;
        try {
            // Try to delete an existed play for the current anonymous player
            response = game.deleteAnonym(playerID);

            if (response == null) {
View Full Code Here

        }
        return response;
    }

    public synchronized Message gameTreatment(String playerID, String playID, String gameInfos) {
        Message response = null;
        try {
            // Check if the player's game is correct.
            response = game.checkGame(playerID, playID, gameInfos);

            if (response == null) {
View Full Code Here

TOP

Related Classes of server.common.Message

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.