Skip to content

Mastermind is a Pygame-based digital version of the classic board game. It offers four modes, including various player and computer interactions, and a Supersuper Mode with 8 colors. Play locally or over a network, and use the build script to create a MacOS executable.

Notifications You must be signed in to change notification settings

frievoe97/pygame-mastermind

Repository files navigation

Mastermind

Pygame Python License

mastermind_2 mastermind_1 mastermind_3

Introduction

Welcome to Mastermind, a digital version of the classic board game developed using Pygame. This project is a work in progress and is made public in its current state because I wanted to share it rather than let it sit unused on my computer.

Please note that the application still has some issues, such as occasional crashes on MacOS, and the code is somewhat messy and unorganized. There is also potential for improvement, such as translating remaining text into English, Dockerizing the server, and adding support for Windows.

I invite anyone interested to explore the project, contribute improvements, and help make it better. Your feedback and contributions are highly welcome!

Table of Contents

About the Project

Mastermind is a strategic board game where one player (CodeMaker) creates a secret code and the other player (CodeBreaker) tries to guess that code. The game also allows playing against the computer or having computer vs. computer matches.

Installation

  1. Prerequisites:

    • Python 3.11
  2. Clone the Repository:

git clone https://github.com/frievoe97/pygame-mastermind
cd pygame-mastermind
  1. Install the Required Python Packages:
pip install -r requirements.txt
  1. Start the Program:
python ./main.py

Game Modes

The game offers four main modes:

  1. CodeBreaker vs. Computer
  2. CodeMaker vs. Computer
  3. Computer vs. Computer
  4. Human vs. Human

Supersuper Mode

In Supersuper Mode, there are 8 colors instead of the standard 6. This mode can be selected in the game settings for an additional challenge.

Network Mode

The game supports network mode, where the computer can be played either locally or over a server. The network mode can be configured in the settings (Online Mode). The HTTP server for the network mode can be started locally using the following script:

python network/server.py

Build Script

For MacOS users, a build script is available to create an executable application. Run the following script to compile the application:

python build_script.py

Note: Currently, the application is only available for MacOS.

TODOs

  • Translate to English: Complete the translation of any remaining text from German to English and review for consistency.
  • Dockerize the Server: Consider setting up the server as a Docker container to simplify deployment and improve portability.
  • Fix MacOS Crashes: Address and resolve the issues causing occasional crashes of the application on MacOS.
  • Support for Windows: Expand the application to support Windows, making it available to a broader audience.

Contact

For questions or comments, please reach out to the project maintainer:

About

Mastermind is a Pygame-based digital version of the classic board game. It offers four modes, including various player and computer interactions, and a Supersuper Mode with 8 colors. Play locally or over a network, and use the build script to create a MacOS executable.

Topics

Resources

Stars

Watchers

Forks

Languages