Skip to content

changminbark/mastermind_game

Repository files navigation

CSCI 205 - Software Engineering and Design

Bucknell University

Lewisburg, PA

Course Info

Instructor: Professor Stough

Semester: 2023FW

Team Information

Chang Min Bark - Class of 2026, Computer Science and Engineering

Nolan Lwin - Class of 2026, Computer Science

Project Information

Project Name: Mastermind

Project Description: Mastermind Java Game is an engaging and interactive console-based application inspired by the classic Mastermind board game. It challenges players to test their logic and deduction skills by guessing a secret code within a limited number of attempts. In our latest update, we've introduced three new algorithms: random, minimax, and DFS (Depth-First Search) to enhance the gameplay experience and offer varied strategic approaches for players.

Key Features

  1. Code Generation: The game generates a secret code made up of a sequence of four number pegs for the player to guess.

  2. Player Input: Players enter their guesses through the console, trying to crack the secret code within a specified number of attempts.

  3. Feedback System: After each guess, the game provides feedback to the player, indicating how accurate their guess was. Feedback typically consists of clues, indicating correct pegs in the correct position (represented as *) and correct pegs in the wrong position (represented as +).

  4. Limited Attempts: Players have a limited number of attempts (up to 12 attempts) to guess the correct code, adding an element of strategy and urgency to the gameplay.

  5. Random Algorithm: The game generates a random code for the player to guess.

  6. Minimax Algorithm: The game generates a code based on the minimax algorithm for the player to guess.

  7. DFS Algorithm: The game generates a code based on the DFS algorithm for the player to guess.

How to run it

  1. Clone the repository to your local machine.
  2. Open the project in your IDE of choice.
  3. Run the Main.java file via this directory: ./src/main/java/hw01/Main.
  4. Follow the instructions in the console to play the game.
  5. Enjoy!
  6. (Optional) To run the JUnit tests, navigate to the ./src/test/java/hw01 directory and run CodeBreaker.java and CodeMaker.java files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages