Skip to content

Conversation

c-stanton
Copy link

@c-stanton c-stanton commented Sep 29, 2025

Collaborated with @BillMillerCoding
Added extra credit hardmode trivia feature.

Copy link

@katmilton katmilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment Details

  • Pull Request title includes "Assignment 1" in the title ✔
  • Partner has also made a commit ✔
  • Pull Request targets Assignment 1 branch ✔
  • Issue 1: Application no longer crashes ✔
  • Issue 2: Unit test properly passes ✔

Extra Credit

  • Come up with a new feature for the application

    • Issue 3: Add a new feature request implemented ✔
    • Issue 3: Feature request unit tested ✔

    This hard mode is absolutely diabolical! Great work!

@KorbinWeiler
Copy link

Assignment Details
Pull Request title includes "Assignment 1" in the title ✔
Partner has also made a commit ✔
Pull Request targets Assignment 1 branch ✔
Issue 1: Application no longer crashes ✔
Issue 2: Unit test properly passes ✔
Extra Credit
Come up with a new feature for the application
Issue 3: Add a new feature request implemented ✔
Issue 3: Feature request unit tested ✔
This hard mode is absolutely diabolical! Great work!

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a hard mode feature to the Princess Bride trivia game where users answer questions by typing the actual answer text instead of selecting multiple choice options. The implementation includes input validation, punctuation stripping, and case-insensitive comparison.

  • Added hard mode selection prompt with input validation
  • Modified question display to hide multiple choice options in hard mode
  • Implemented text-based answer comparison with punctuation removal and case-insensitive matching

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
global.json Updated .NET SDK version from 9.0.100 to 9.0.305
Program.cs Added hard mode functionality with user input validation, text-based answer comparison, and modified question display logic
ProgramTests.cs Added unit tests for the new DisplayHardResult method and removed extra whitespace

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@BenjaminMichaelis
Copy link
Contributor

I haven't popped open git to see what exactly is going on, but something with your git is weird - I expect to only see the commits of the changes you made, not all the commits that have ever existed on this Assigment1 branch

image

@c-stanton
Copy link
Author

c-stanton commented Sep 30, 2025

@BenjaminMichaelis I messed up my branch and working directory at the start and I didn't catch it before my collaborator joined up, they branched off of my working branch so I didn't want to squash the commits and risk losing those. I considered trying to cherry pick the commits to clean it all up but I'm just not familiar enough.

c-stanton and others added 9 commits September 30, 2025 16:40
…r must type out the answers instead of selecting them from a multiple choice sheet
decimal integer division
…er method to strip puncuation from user input
corrected spelling of "arbitrary"

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Moved question object instantiation for safety
Added suggested validation check.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@steeley21 steeley21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Assignment Details

Pull Request title includes "Assignment 1" in the title ✔
Partner has also made a commit ✔
Pull Request targets Assignment 1 branch ✔
Issue 1: Application no longer crashes ✔
Issue 2: Unit test properly passes ✔

Extra Credit

Come up with a new feature for the application
    Issue 3: Add a new feature request implemented ✔
    Issue 3: Feature request unit tested ✔

string normalizedGuess = RemovePunctuation(userGuess).Trim();
if (!int.TryParse(question.CorrectAnswerIndex, out int index) || index < 1 || index > question.Answers.Length)
{
Console.WriteLine("Incorrect");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpick, but here you simply write "Incorrect" when the user enters something that CorrectAnswerIndex can't parse or is out of range. This reads like they just got the answer wrong, when it's actually a parsing issue. It might be clearer to print a more descriptive message, "Error - user answered out of range" and prompt for new input, or throwing an exception on it.

BillMillerCoding and others added 2 commits October 2, 2025 21:09
Commit from a small change that copilot suggested

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Another commit for a suggestion by copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

github-actions bot commented Oct 3, 2025

Summary

Summary
Generated on: 10/03/2025 - 04:11:18
Coverage date: 10/03/2025 - 04:11:16
Parser: MultiReport (2x Cobertura)
Assemblies: 1
Classes: 2
Files: 2
Line coverage: 50.4% (55 of 109)
Covered lines: 55
Uncovered lines: 54
Coverable lines: 109
Total lines: 164
Branch coverage: 28.9% (11 of 38)
Covered branches: 11
Total branches: 38
Method coverage: Feature is only available for sponsors
Tag: 47_18212617839

Coverage

PrincessBrideTrivia - 50.4%
Name Line Branch
PrincessBrideTrivia 50.4% 28.9%
PrincessBrideTrivia.Program 49% 28.9%
PrincessBrideTrivia.Question 100%

Copy link

@Joshua-Lester3 Joshua-Lester3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment Details

  • Pull Request title includes "Assignment 1" in the title ✔
  • Partner has also made a commit ✔
  • Pull Request targets Assignment 1 branch ✔
  • Issue 1: Application no longer crashes ✔
  • Issue 2: Unit test properly passes ✔

Extra Credit

  • Come up with a new feature for the application
    • Issue 3: Add a new feature request implemented ✔
    • Issue 3: Feature request unit tested ✔

}
}

// Unit test for hardmode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments describing things that can be determined by looking at the code clutter the codebase. I'll reference the guidelines in a sec, but I'd lean towards writing self-documenting code. Under the books guidelines, it says DO NOT use comments unless they describe something that is not obvious to someone other than the developer who wrote the code. There are a few other places in the PR that show similar comments - I'll briefly note one other.

Comment on lines +73 to +74


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the extra whitespace adds anything here

}

public static bool AskQuestion(Question question)
//UPDATED THIS FUNCTION WITH PARAMETER isHard

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one isn't necessary either for example

@Joshua-Lester3
Copy link

@c-stanton @BillMillerCoding remember to address (reply to), possibly fix, and resolve all peer review comments in future assignments. Copilot's review as well. I see some changes according to reviews, but not all are responded to, possibly (if you agree with the reviewer) fixed, and resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants