Skip to content

raymondyangdev/bulls-and-cows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bulls And Cows

Welcome to the Bulls and Cows game! You must chooses a secret code of 4 digits from 0 – 9, with all digits being different. The objective is for you to guess the AI's secret code and the AI to guess your secret code.

Overview

Objective: Guess the opponent's secret 4-digit code by deducing the correct sequence of digits.

Guessing: On each turn, players present their guesses for the opponent's secret code.

Feedback: After each guess, the opponent provides feedback in terms of "bulls" and "cows":

  • A "bull" indicates a correct digit in the correct position.
  • A "cow" indicates a correct digit in a different position.

AI Difficulty Levels:

  • Easy AI: The AI generates random valid guesses.
  • Medium AI: The AI avoids repeating previous guesses.
  • Hard AI: The AI uses an intelligent strategy to optimise guessing.

Saving Results: After the game, you can choose to save the results to a text file. The saved file includes:

  • Player and computer's secret numbers.
  • Each guess made during the game, along with its result (bulls & cows).
  • Identity of the winner or a draw message.

Wordle Variation: In addition to Bulls and Cows, you can also choose to play Wordle. In this variation, you have six attempts to guess a five-letter word. The computer does not participate in this version.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages