protected void nextCats_Click(object sender, EventArgs e) { var allCats = SessionHelper.Get <List <Cat> >("Cats"); var leftCat = allCats.Find(c => c.id == leftCatId.Value); var rightCat = allCats.Find(c => c.id == rightCatId.Value); EloRating.UpdateScores(leftCat, rightCat, 0.5, 400, 10); DisplayTwoCats(); }
public void ScoreCat(WhichCat whichCat) { var allCats = SessionHelper.Get <List <Cat> >("Cats"); var leftCat = allCats.Find(c => c.id == leftCatId.Value); var rightCat = allCats.Find(c => c.id == rightCatId.Value); var resultat = whichCat == WhichCat.Left ? 1 : 0; EloRating.UpdateScores(leftCat, rightCat, resultat, 400, 10); }