Examples of GamesJsonContainer


Examples of org.scotlandyard.engine.json.GamesJsonContainer

    res.getResponseMessage();
    //final org.w3c.dom.Document xml = res.getDOM();
    final String response = res.getText();

    Gson gson = new Gson();
    GamesJsonContainer obj = gson.fromJson(response, GamesJsonContainer.class);

    assertEquals(
        "the value of games should be zero",
        0,
        obj.games.size()
View Full Code Here

Examples of org.scotlandyard.engine.json.GamesJsonContainer

  @Override
   public Object getOutput(
         final HttpServletRequest request,
        final GameEngine engine) throws GameException {

    final GamesJsonContainer gjc = new GamesJsonContainer();
    gjc.games=new ArrayList<String>();
    for(Game game:GameEngine.instance().getLobby().getAvailableGames()){
      gjc.games.add(game.getIdentifier());
    }

    return (gjc.toJson());
    }
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.