@Override
    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
            throws ServletException, IOException {
        final String pathInfo = request.getPathInfo();
        if (StringUtils.isEmpty(pathInfo)) {
            response.sendRedirect("view");
        } else if (GAME_JOIN.matcher(pathInfo).matches()) {
            final int gameId = Integer.parseInt(pathInfo.substring(6));
            final Game game = serverStatus.getGame(gameId);
            final String userName = request.getParameter("user");
            if (game != null) {
                game.addPlayer(new Player(new PlayerInfo(userName)));
                response.sendRedirect("/play/game/" + gameId + "/usr/" + userName);
            } else {
                response.setContentType("text/html");
                response.getWriter().print(REDIRECT_HOME);
            }

        } else {
            response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
        }
    }