Exemple #1
0
 public IActionResult OnPost()
 {
     _gl.GuessWord(Letter);
     Lives            = _gl.Lives;
     GuessingLetters  = _ss.GetGuessingLetters();
     Word             = new string(GuessingLetters);
     VictoryCondition = _ss.GetCondition();
     if (VictoryCondition != 0)
     {
         return(Redirect("EndPage"));
     }
     return(default);
Exemple #2
0
 public HangmanModel(GuessLogic gl, SessionStorage ss)
 {
     _gl = gl;
     _ss = ss;
     if (Word == default)
     {
         Word = new string(_ss.GuessingLetters);
     }
     if (Lives == default)
     {
         Lives = _ss.Lives;
     }
     VictoryCondition = _ss.GetCondition();
 }