コード例 #1
0
  /** Return the user's data after updating his stats */
  @RequestMapping("/users/{name}")
  @ResponseBody
  public Partie user(@PathVariable final String name) throws IOException {
    Logger.getLogger(LOGGER_NAME).info("Getuser(): " + name);

    Partie partie = gameHandler.findPartie(name);

    return partie;
  }
コード例 #2
0
  /** Return the user's data after updating his stats */
  @RequestMapping("/users/{name}/deletedeteUser")
  @ResponseBody
  public Partie deletedeteUser(@PathVariable final String name) throws IOException {
    Logger.getLogger(LOGGER_NAME).info("deletedeteUser(): " + name);

    User user = gameHandler.findUser(name);
    gameHandler.deleteUserdete(user);
    Partie partie = gameHandler.findPartie(name);
    return partie;
  }
コード例 #3
0
  /** ajouter le nombre de line */
  @RequestMapping("/users/{name}/{detes}/addline")
  @ResponseBody
  public Partie addline(@PathVariable final String name, @PathVariable final int detes)
      throws IOException {
    Logger.getLogger(LOGGER_NAME).info("detes(): " + detes);
    Logger.getLogger(LOGGER_NAME).info("user(): " + name);
    User user = gameHandler.findUser(name);

    gameHandler.addlinesforuserwithpartie(user, detes, 2);
    /* List<User> users = gameHandler.findlistusers();
    ListUser userlist = new ListUser();
    for (User usercurrr:users) {
        userlist.listUser.add(usercurrr);
    }*/
    Partie partie = gameHandler.findPartie(name);
    return partie;
  }