public IActionResult Index() { CatRandomizer randy = new CatRandomizer(); randy.ChooseCandidates(); ViewBag.first = Cats.cats[randy.firstIndex].url; ViewBag.firstIndex = randy.firstIndex; ViewBag.sec = Cats.cats[randy.secondIndex].url; ViewBag.secondIndex = randy.secondIndex; return(View()); }
public IActionResult Voted(int catIndex) { Cats.AddVote(catIndex); CatRandomizer randy = new CatRandomizer(); randy.ChooseCandidates(); ViewBag.first = Cats.cats[randy.firstIndex].url; ViewBag.sec = Cats.cats[randy.secondIndex].url; ViewBag.firstIndex = randy.firstIndex; ViewBag.secondIndex = randy.secondIndex; return(View("Index")); }