Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.61 KB

README.md

File metadata and controls

28 lines (24 loc) · 1.61 KB

🐮 Bull & Cows Game 🐄

Java

Introduction

Welcome to my implementation of the classic game of Bull & Cows, written in Java and using JOptionPane for popups. This program allows the user to play the game by guessing a randomly generated secret number. The game includes an abstract class named Expression which provides the basic functionality of the game.

How to Run

The program can be run by executing the `Game.java` file. You will need to have the latest version of Java installed on your system.

Game Rules

  • The objective of the game is to guess a four-digit secret number that has been randomly generated by the program.
  • The player will be prompted to enter a four-digit guess, and will be given feedback on the number of bulls (correct digits in the correct position) and cows (correct digits in the wrong position) in their guess.
  • The player will keep guessing untill he gets the full number.

Controls

  • To start the game.
  • To make a guess, enter a four-digit number in the text field and press the guess button.
  • The program will show you the number of bulls and cows in your guess.
  • If you guess the secret number correctly, you win the game!

Conclusion

I hope you enjoy playing this game! Bull & Cows is a classic game that requires logical thinking and deduction skills. Let me know if you have any issues or suggestions for improvements!

Happy Guessing! 🕵️‍♂️