title: Rock - Paper - Scissors: How to add scoring?
body: <p>(I tried all kind of combinations and looked it up but most solutions were in other languages like python.)</p>
  
  <p>I'm trying to make a simple rock paper scissors game in C# with ASP.NET MVC where I can add the score. The first one (computer vs. player) to reach score 10 wins the game. I also want to add to option where you can Bet for more than 1 point.</p>
  
  <p>I made the game with simple nested if statements and have added scoring in between. Problem is that when I press play (send to server..) to go again, he resets the score and starts again. How do I fix this?</p>
  
  <p>The second question is: how I can add a betting system that I implement in the score? Just typing </p>
  
  <blockquote>
    <p>vScoreUser += (Bet * 1);</p>
  </blockquote>
  
  <p>doesn't seem to work. </p>
  
  <p>Here is the code of my class:</p>
  
  <pre><code>    public class BladSteenSchaar
      {
      //Fields       
      private string vChoice;
      private int vChoiceComputer;
      private string vResult;
      Random vRandom = new Random();
  
      //Properties 
      public string Choice
      {
          get { return vChoice; }
          set 
          { 
              vChoice = value; 
  
              //Spel opstarten
              this.GeefResult();
          }
      }        
      public int ChoiceComputer
      {
          get { return vChoiceComputer; }
          //set { vChoiceComputer = value; }
      }
      public int Bet { get; set; }
      public string Result
      {
          get { return vResult; }
          //set { vResult = value; }
      }
  
      private int vScoreUser;
  
      public int ScoreUser
      {
          get { return vScoreUser; }
          set { vScoreUser = value; }
      }
      private int vScoreComputer;
  
      public int ScoreComputer
      {
          get { return vScoreComputer; }
          set { vScoreComputer = value; }
      }
  
  
      //Methods
      public void GeefResult() 
      { 
          //Vars
  
          //Generate random choice where: 0 = Rock, 1 = Paper en 2 = Siccors)            
          vChoiceComputer = vRandom.Next(0, 3);
  
          //Nested if statements met vResult als output
          if (Choice == "Rock")
          {
              if (vChoiceComputer == 0) //Rock
              {
                  vResult = "Draw!";                   
              }
              else if (vChoiceComputer == 1) //Paper
              {
                  vResult = "U lost!";
                  vScoreComputer = vScoreComputer + 1;
              }
              else if (vChoiceComputer == 2) //Siccors
              {
                  vResult = "U won!";
                  vScoreUser = vScoreUser + 1;
              }   
          }
          else if (Choice == "Paper")
          {
              if (vChoiceComputer == 0) //Rock
              {
                  vResult = "U won!";
                  vScoreUser = vScoreUser + 1;
              }
              else if (vChoiceComputer == 1) //Paper
              {
                  vResult = "Draw!";
              }
              else if (vChoiceComputer == 2) //Siccors
              {
                  vResult = "U lost!";
                  vScoreComputer = vScoreComputer + 1;
              }    
          }
          else if (Choice == "Siccors")
          {
              if (vChoiceComputer == 0) //Rock
              {
                  vResult = "U lost!";
                  vScoreComputer = vScoreComputer + 1;
              }
              else if (vChoiceComputer == 1) //Paper
              {                   
                  vResult = "U won!";
                  vScoreUser = vScoreUser + 1;
              }
              else if (vChoiceComputer == 2) //Siccors
              {
                  vResult = "Draw!";
              }
          }
  
      }
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>    public ActionResult Oef127()
      {
          //Default-object
          BladSteenSchaar vBladSteenSchaar = new BladSteenSchaar();
          vBladSteenSchaar.Bet = 1;
  
          //Show
          return View(vBladSteenSchaar);
      }
      [HttpPost]
      public ActionResult Oef127(BladSteenSchaar vBladSteenSchaar)
      {
  
  
          //Show
          return View(vBladSteenSchaar);
      }
  </code></pre>
  
  <p>HTML/CSS:</p>
  
  <pre><code>@model Project_CS.Classes.BladSteenSchaar
  
  @{
  ViewBag.Title = "Oef127";
  }
  
  &lt;style&gt;
  
  form {
      background-color: lightblue;
      padding: 10px 20px 20px 20px;
      width: 500px;
  }
  
  td {
      text-align: center;
      padding: 5px;
  }
  
  &lt;/style&gt;
  
  &lt;form method="post"&gt;
  
  &lt;h2&gt;Rock - Paper - Siccors!&lt;/h2&gt;
  &lt;hr /&gt;
  
  Make your Choice: &lt;br/&gt;
  &lt;input type="radio" name="Choice" value="Rock"&gt;Rock
  &lt;br /&gt;
  &lt;input type="radio" name="Choice" value="Paper"&gt;Paper
  &lt;br /&gt;
  &lt;input type="radio" name="Choice" value="Siccors"&gt;Siccors
  &lt;br /&gt;
  
  &lt;br/&gt;
  Do you want to play for 1, 2 or 3 points?
  &lt;br/&gt;
  &lt;input type="text" name="Bet" value="@Model.Bet" /&gt;
  
  &lt;hr/&gt;
  &lt;input type="submit" value="Send to Server!" /&gt;
  
  &lt;br/&gt;
  
  &lt;/form&gt;
  
  &lt;h3&gt;Result:&lt;/h3&gt;
  
  @Model.Result
  
  &lt;br /&gt;&lt;br /&gt;
  
  &lt;b&gt;Current score:&lt;/b&gt; &lt;br /&gt;
  
  &lt;table&gt;
  &lt;tr&gt;
      &lt;td&gt;Player&lt;/td&gt;
      &lt;td&gt;Computer&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;@Model.ScoreUser&lt;/td&gt;
      &lt;td&gt;@Model.ScoreComputer&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>If you can spot any other mistakes, please let me know.</p>