Skip to content

TechLeoo/Number-Guessing-Game-Object-Oriented-Implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number Guessing Game: Object-Oriented Implementation

Overview

"Number Guessing Game: Object-Oriented Implementation" is a console-based application developed in Java that challenges players to guess a randomly generated 4-digit number. Utilizing Object-Oriented Programming (OOP) principles, the game offers an engaging experience where players receive feedback on their guesses, aiding them in deducing the secret number within a limited number of attempts.

Objectives

  • Game Development: Create an interactive console game that prompts users to guess a 4-digit number.
  • Object-Oriented Design: Implement the game using OOP principles such as classes, objects, and methods to structure the code efficiently.
  • User Interaction: Provide clear prompts and feedback to enhance user experience.
  • Input Validation: Ensure that user inputs are valid 4-digit numbers without repeating digits.

Game Rules

  • Secret Number: A 4-digit number is randomly generated, ensuring all digits are unique.
  • Player's Guess: The player inputs a 4-digit number, also with unique digits.
  • Feedback:
    • Bulls: Number of digits that are correct and in the correct position.
    • Cows: Number of digits that are correct but in the wrong position.
  • Objective: Guess the secret number within a set number of attempts, using the feedback provided after each guess.

Features

  • Random Number Generation: Generates a secret 4-digit number with unique digits at the start of each game.
  • User Input Handling: Accepts user guesses, ensuring they are valid 4-digit numbers with unique digits.
  • Feedback System: After each guess, informs the player of the number of bulls and cows, guiding them toward the correct number.
  • Object-Oriented Structure: Utilizes classes and methods to organize the game's functionality, promoting code reusability and clarity.
  • Multi-Player: Allows for an unlimited number of players.

About

Building a web UI for our Bulls and Cows game, using OOP and deploying with streamlit. This project is for educational purposes, pushing the depths of what we can achieve with streamlit.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages