Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dice Game#31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ZacharyPatten merged 16 commits intodotnet:mainfromjavithegreat35:main
Apr 13, 2022
Merged

Dice Game#31

ZacharyPatten merged 16 commits intodotnet:mainfromjavithegreat35:main
Apr 13, 2022

Conversation

@javithegreat35
Copy link
Contributor

Hello, I have created a new game called "Dice Game" which has the player go up against a computer and they will each roll a dice 10 times and the player who gets the higher number 10 times wins the game.

@ZacharyPatten
Copy link
Collaborator

Hello. Thanks for checking out the repo and contributing. :)

I will review this pull request as soon as I have time to do so.

@ZacharyPattenZacharyPatten self-assigned thisApr 12, 2022
@ZacharyPatten
Copy link
Collaborator

I made some changes:

  • f0801a3 moved the project into theProjects directory because that is where all the projects are
  • f1ada2d I changedConsole.ReadKey() toConsole.ReadKey(true) because this hides the user input (for example if the user types theA key)
  • f3b01e8 added a description of the game that shows when the application is launched
  • ff86f29
    • changed the turn order so that the Rival rolls the dice first as I felt it would add more anticipation because the player knows what they need to roll to win.
    • removed theThread.Sleep because I don't think it is entirely necessary here
    • updated the output verbiage a bit
  • 638994a removedclass Program so that the code is top-level statements because it is shorter
  • 4a168b7 used string interpolation to simplify the code from
    "The score is now - You : " + playerPoints + ". Rival : " + rivalPoints + "." to
    $"The score is now - You : {playerPoints}. Rival : {rivalPoints}."
  • cd9290b moved the declaration ofrivalRandomNum andplayerRandomNum inside the loop rather than before because that is generally the preferred place to declare variables

And I made some additions:

  • 43d9c5f added a blazor port of the game so that it will appear on the website and be playable online :)
  • 7acfdff added the necessary files so thatDice Game shows up as an option when using Visual Studio Code
  • eb2dfac added a GitHub Actions workflow for build validation
  • c18112d addedDice Game toREADME.md so it shows up on the home page of the GitHub repo and and added aProjects\Dice Game\README.md

@javithegreat35
Copy link
ContributorAuthor

javithegreat35 commentedApr 13, 2022 via email

Thank you so much! This was my first time working on something from GitHub, thank you for assisting me!Best Regards,Javier
On Apr 12, 2022, at 5:49 PM, Zachary Patten ***@***.***> wrote:  I made some changes:f0801a3 moved the project into the Projects directory because that is where all the projects aref1ada2d I changed Console.ReadKey() to Console.ReadKey(true) because this hides the user input (for example if the user types the A key)f3b01e8 added a description of the game that shows when the application is launchedff86f29 changed the turn order so that the Rival rolls the dice first as I felt it would add more anticipation because the player knows what they need to roll to win. removed the Thread.Sleep because I don't think it is entirely necessary here updated the output verbiage a bit638994a removed class Program so that the code is top-level statements because it is shorter4a168b7 used string interpolation to simplify the code from "The score is now - You : " + playerPoints + ". Rival : " + rivalPoints + "." to $"The score is now - You : {playerPoints}. Rival : {rivalPoints}."cd9290b moved the declaration of rivalRandomNum and playerRandomNum inside the loop rather than before because that is generally the preferred place to declare variables And I made some additions:43d9c5f added a blazor port of the game so that it will appear on the website and be playable online :)7acfdff added the necessary files so that Dice Game shows up as an option when using Visual Studio Codeeb2dfac added a GitHub Actions workflow for build validationc18112d added Dice Game to README.md so it shows up on the home page of the GitHub repo and and added a Projects\Dice Game\README.md — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
ZacharyPatten reacted with hooray emoji

@ZacharyPattenZacharyPatten merged commit8daddd0 intodotnet:mainApr 13, 2022
@ZacharyPatten
Copy link
Collaborator

ZacharyPatten commentedApr 13, 2022
edited
Loading

This pull request has bene merged. Thanks@javithegreat35 for contributing a new game, and congratulations on your first pull request on GitHub!

If you want to show off your game, it is playable at this link:https://zacharypatten.github.io/dotnet-console-games/Dice%20Game

#17

@ZacharyPatten
Copy link
Collaborator

ZacharyPatten commentedApr 19, 2022
edited
Loading

By the way, yours was the first game to be contributed and not originally written by myself (other contributors contributed to existing games). You already show up in the contributors tab of the repo, but if you would to be explicitly mentioned on that game let me know.

For example...

contributors:@javithegreat35

...could be added in theNotes column of theDice Game row of the table in theREADME.md.

@javithegreat35
Copy link
ContributorAuthor

javithegreat35 commentedApr 25, 2022 via email

Hello,Sorry for the late response. Yes, you could mention me anywhere you see fit! Again thank you for all your help!
Sent from my iPhone
On Apr 19, 2022, at 12:23 PM, Zachary Patten ***@***.***> wrote:  By the way, yours was the first game to be contributed (other contributors contributed to existing games). If you would like that to be mentioned anywhere let me know. For example, contributors:@javithegreat35 in the Notes column of the table in the README.md. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

@ZacharyPattenZacharyPatten added the community contributionGames originally contributed by members of the community. Thank you! labelApr 29, 2022
@ZacharyPattenZacharyPatten removed their assignmentApr 29, 2022
Fuinny pushed a commit to Fuinny/dotnet-console-games that referenced this pull requestJun 26, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

community contributionGames originally contributed by members of the community. Thank you!

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@javithegreat35@ZacharyPatten

[8]ページ先頭

©2009-2025 Movatter.jp