@RequestMapping(value = "/", method = RequestMethod.POST)
    public String checkShot(@PathVariable int idGame, ShotForm shotForm, ModelMap model) {
        model.put("idGame", idGame);
        int letter = Integer.parseInt(shotForm.getLetter());
        int figure = Integer.parseInt(shotForm.getFigure());
        int cellNumber = figure*10+letter;

         // opponent field
        Field field;
        Game game = gameService.getGameById(idGame);
        if (game.getFirstLogin().equals(SecurityContextHolder.getContext().getAuthentication().getName())) {
            field = fieldService.getFieldById(game.getIdSecondField());
        } else {
            field = fieldService.getFieldById(game.getIdFirstField());
        }
        //shot
        String shot = field.getShots();
        String[] shots = shot.split(",");
        //String ship
        String ship = field.getShips();
        String[] ships = ship.split(",");

        // check
        if (!shot.equals("")) {
            for (int i = 0; i < shots.length; i++) {
                if (Integer.parseInt(shots[i]) == cellNumber) {
                    model.put("message", "You are wrong. You have shooted this cell!");
                    return "gamePages/fieldsForGame/shotResult";
                }
            }
        }
        fieldService.addShot(field.getId(), cellNumber);
        field = fieldService.getFieldById(field.getId());
        if (!ship.equals("")) {
            for (int i = 0; i < ships.length; i++) {
                if (Integer.parseInt(ships[i]) == cellNumber) {
                    if (field.isKilled()) {
                        gameService.setWinner(idGame, SecurityContextHolder.getContext().getAuthentication().getName());
                        model.put("message", "Congratulations! You are winner");
                        gameService.changeMove(idGame);
                    } else {
                        model.put("message", "Congratulations!");
                    }
                    return "gamePages/fieldsForGame/shotResult";
                }
            }
        }
        model.put("message", "Sorry, you missed");
        gameService.changeMove(idGame);
        return "gamePages/fieldsForGame/shotResult";
    }