Package models.data

Examples of models.data.FixedTimeChallengeGame.save()


        game.setAddedOn(GameUtil.getCurrentTimeStamp());
        game.setMaxPlayers(gameForm.maxPlayers);
        game.setOwner((Player) user);
        game.setOpenBalance(gameForm.openBalance);
        //adding game player to list
        game.save();
        game.joinGame(user);
        return game;
    }

    /**
 
View Full Code Here


                .where().eq("id", id).findUnique();

        //save new virtual current date if no gotten
        if (game.getVirtualStartDate() != null) {
            game.setVirtualCurrentDate(TimeKeeper.convert(game));
            game.save();
        }
        User player = UserManager.getCurrentLoggedInUser();

        // set the game state
        List<GamePlayer> gamePlayers = game.getPlayers();
View Full Code Here

        gameState.setPlayers(gamePlayers);
        gameState.setNumOfDays(game.getGameLength());
        gameState.setCurrentDay(game.getVirtualCurrentDate() == null ? 0 : GameUtil.getCurrentDay(game));
        if (gameState.getCurrentDay() > gameState.getNumOfDays()) {
            game.setGameStatus(enums.GameStatusEnum.END.toString());
            game.save();
        }
        gameState.setGame(game);
        GamePlayer currentGamePlayer = game.getPlayerInGame(player);
        gameState.setCurrentPlayer(currentGamePlayer);
        if (currentGamePlayer != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.