Examples of GameScoreHiber


Examples of si.unimb.cot.mgbl.gamemgmt.datamodel.GameScoreHiber

             
              User user=um.registerUserByMsisdn(senderMSIDSN, "", gm.getGroup("mGBL"));
             
              //TODO check security - what about new players!?!?!
       
              GameScoreHiber gs=new GameScoreHiber();
              gs.setGame(g);
              gs.setCompleteScore(gameScore);
              gs.setPlayer(user.getId());
              gs.setAchievedAt(new GregorianCalendar());
       
              GameScoreDao.persistGameScore(gs,session);

              //update max and avg socres for the game!
              ArrayList/*<GameScoreHiber>*/ gscrs=GameScoreDao.getAllScoresForGame(g,null,session);
              boolean first=true;
              int max=0;
              int avg=0;
        //      for (GameScoreHiber score : gscrs) {
              for (Iterator iterator = gscrs.iterator(); iterator.hasNext();) {
                GameScoreHiber score = (GameScoreHiber) iterator.next();
             
                int sc=score.getCompleteScore();
               
                if (first) {
                  first=false;
                  max=sc;
                }
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.