Skip to content

A demo based on the game Master Mind to exercise TDD

Notifications You must be signed in to change notification settings

tschissler/TDD-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is an project that can be used to practice TDD. It is based on the game of Master Mind (also known with many other names) See Wikipedia for game rules

As of now it is available in C# and JavaScript (NodeJs).

The goal of the game is to guess an 4-digit secret code. For each guess the system provides feedback on how many of the guess are actually in the code and how many are at the right position. Using TDD developers should now implement the logic calculating the correct feedback result.

Getting Started

C#

The C# version is based on .NET6.

The easiest way to run this version might be in using Visual Studio or VSCode.

You can also use dotnet run --project MasterMind.App to run the application and dotnet test to run tests.

JavaScript / NodeJs

The code has been created by using VSCode but any other IDE should also be sufficient.

The NodeJs version can be run by typing node index.js To execute tests either use the Test Explorer inside VSCode or type npm test

Python

The code has been created by using VSCode but any other IDE should also be sufficient.

The python version can be run by typing python .\masterMind.py To execute tests, first run pip install pytest, then either use the Test Explorer inside VSCode or type pytest .\masterMindTests.py

Contribute

If you would like to contribute improvements or new language versions, just create a PR.

About

A demo based on the game Master Mind to exercise TDD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published