package net.sevecek.kostka;

import org.springframework.stereotype.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.*;

@Controller
public class HlavniController {

    @RequestMapping("/hod-kostkou.html")
    @ResponseBody
    public ModelAndView zobrazHodKostkou() {
        ModelAndView modelAndView = new ModelAndView(
                "/WEB-INF/view/hod-kostkou.jsp");
        Integer hozeno = (int)(Math.random() * 6 + 1);
        modelAndView.addObject("hozenoNaKostce", hozeno);
        return modelAndView;
    }

}
