private void btnUseMove_Click(object sender, EventArgs e) { // Parse the user input to a Round.moves enum value userMove = parseUserInput(drpAvailableMoves.SelectedItem.ToString()); // Generate the data for this round cpuMove = generateGuess(); currentRound = new Round(userMove, cpuMove); // Add the data from this round to the list of previous // rounds gameData.Add(currentRound); // Write the result of this round to the log rtbResults.AppendText("Game number: " + gameData.Count + Environment.NewLine); rtbResults.AppendText("______________" + Environment.NewLine); rtbResults.AppendText(currentRound.ToString() + Environment.NewLine); // Ensure we scroll to the end of the line rtbResults.ScrollToCaret(); if (gameData.Count >= 10) { btnGenerateStats.Enabled = true; btnGenerateStats.Visible = true; } }
public void StartNewGame() { Console.WriteLine("New Game started"); Round round = new Round(); round.ScoreRound(); round.DetermineWinner(); }