Tuesday, September 17, 2013

Mastermind

Play a code-breaking game called master mind.


The game use alphabets as the code and X,Y,Z as the answer comment instead of colors in this script.

Language: Windows Batch Script (.bat)

You can choose game level, number of attempts and choose whether it may contain duplicates or not and will have no empty spaces, which is usually 4 letters 6 codes 10 attempts

View the source code here:
https://github.com/wthe22/batch-scripts/blob/master/Mastermind.bat

Save this script as ANSI encoding by copying the script and paste it in notepad.

2 comments:

  1. Totally unplayable because the turn scoring is faulty. For example, the correct code was "CEEA", my guess was "AABB", and the reported score was "XXYY". The correct score is "XXXY". See http://www.dostips.com/forum/viewtopic.php?p=39024#p39024 and http://www.dostips.com/forum/viewtopic.php?p=39040#p39040 for a pair of working batch mastermind games.

    ReplyDelete
    Replies
    1. Turn scoring is fixed and new features are added :)

      Delete