Skip to content

ShangYi7/Bulls-and-Cows

Repository files navigation

Bulls and Cows Number Guessing Game

This is a simple number guessing game developed using C# Forms, where players need to guess the randomly generated number.

How to Use

  1. Open the Program: Run the program and enter the game interface.

  2. Generate Number: Click the "Generate Number" button to generate a random number between 0 and 100.

  3. Guess the Number: Enter your guess in the text box and click the "Guess" button.

  4. Result Evaluation: The program will provide feedback based on your guess. If you guess correctly, a message box will appear saying "You guessed it right"; if your guess is lower than the answer, the minimum number you guessed will be displayed on the screen; if your guess is higher than the answer, the maximum number you guessed will be displayed on the screen.

  5. Guess Again: You can continue guessing based on the feedback until you guess the correct number.

Notes

  • Please make sure the number you enter is within the range of 0 to 100, otherwise, the program will give an appropriate error message.

  • Please enter a positive integer, otherwise, the program will give an appropriate error message.

  • You can comment out the line label3.Text = $"Ans: {num}"; in the code to hide the answer.

License

Bulls-and-Cows by ShangYi7 is licensed under CC BY-NC-SA 4.0

Hope this README helps! If you need further assistance, please don't hesitate to ask.

About

Bulls and Cows C#

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages