Package org.scotlandyard.engine.json

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


  @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

Related Classes of org.scotlandyard.engine.json.GamesJsonContainer

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.