Beispiel #1
0
        public void SelecteerPersonage()
        {
            bool x = personagerepo.SelecteerPersonage(1, 1);
            bool y = personagerepo.SelecteerPersonage(0, 1);

            Assert.AreEqual(true, x);
            Assert.AreEqual(false, y);
        }
Beispiel #2
0
 public IActionResult StartGame(int id)
 {
     if (id != 0 && id <= 10)
     {
         int userId = Convert.ToInt32(HttpContext.Session.GetInt32("CurrentUserID"));
         personagerepo.SelecteerPersonage(id, userId);
         return(RedirectToAction("Gamewereld"));
     }
     else
     {
         TempData["Error"] = "Ongeldig personage geselecteerd.";
         return(RedirectToAction("NewGame"));
     }
 }