Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weescottishpuffin/mastermind-cs
https://github.com/weescottishpuffin/mastermind-cs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/weescottishpuffin/mastermind-cs
- Owner: WeeScottishPuffin
- Created: 2024-11-04T13:31:49.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-11-04T13:41:47.000Z (3 months ago)
- Last Synced: 2024-11-04T14:33:06.541Z (3 months ago)
- Language: C#
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mastermind
**An ASCII implementation of the simple guessing game, mastermind.**
This is my first [Java project](https://github.com/WeeScottishPuffin/MasterMind), rewritten in C#.
## How it works
It is function the same as the Java version:
After starting up the program `MainProg.cs`, a simple splash screen will display. Pressing `` on your keyboard will start the game. In the code, there are two `final` variables controlling the length of the code and the amount of guesses you get to crack said code.
At the start of the game, the computer randomly generates a code consisting of random colours (which are stored in the `Colours.cs` file). After this, you will be able to submit your guesses every turn by entering the first letter of any of the colours.
After every turn, the computer will show you how accurate your guess is. It will display this in the form of yellow and green pins. A yellow pin means that the colour at the given positions occurs at least once in the code, but not on this specific position. A green pin is place when the colour occurs at that specific position. That colour may however occur more times in the complete code.
If you correctly guess the code within the turn limit, you win.
## File Structure
```
REPO #
├MasterMind #
│ ├MasterMind.csproj # Standard .csproj file
│ ├Colours.cs # Stores the values of all possible colours
│ ├Visualiser.cs # Method to visualise the board using ANSI/ascii art
│ └MainProg.cs # Main code
├readme.md # README
├MasterMind.sln # VS Solution File
└.gitignore # Standard .gitignore```