Page 1 of 1

Dragon Prophet Mini-Game Treasure Box

Posted: Mon Sep 29, 2014 6:02 am
by BlubBlab
In Dragon Prophet there is a mini-game which is similar to the board game Mastermind it use number instead of colours. (http://en.wikipedia.org/wiki/Mastermind ... rd_game%29)

I was so annoyed by this that I wrote a tool which helps the player to solve this and crack the code.(because of this the tool is called codebreaker)

The Tool is written in c# .NET source code.(If you need it use a reverse engineer tool)
Image
Use the code which the tool gives you and than put in the response off the game(RED/GREEN/NOTHING) and press solve/next.
Repeat that until the chest is opened.

Re: Dragon Prophet Mini-Game Treasure Box

Posted: Fri Nov 21, 2014 4:52 am
by BlubBlab
Because it was wished I uploaded the source code. I also uploaded a new version and greetings to the 17 guys who downloaded the previous version before :D

What I changed:
If the program hit the end of the list a popup window show up, means when only 1 solution is possible any more or when you did something wrong.

I also modified the scoring when every solution seems the have the same scoring the program tries to make a guess by targeting the solution which "hide" the most

Code: Select all

if (bestscore <= 1 || (isallequal && list.Count > 1))
            {
                bestscore = 500;
                foreach (Code element in list)
                {
                    int guess = element.getNum();
                    int score = 0;
                    foreach (Code element2 in list)
                    {
                       
                         score =  score + (element2.guessGreen(guess)+ element2.guessRed(guess));
                        
                    }
                    if (score < bestscore)
                    {
                        bestscore = score;
                        bestchoice = guess;
                    }
                }
            }
Maybe I will add a check box in the next version where you can flip around that behaviour but since it is an exception handling I don't see a point for it.

In short:
- added popup window
- improve scoring
- changed start number