(11C) Code guessing game
|
04-30-2018, 07:29 PM
(This post was last modified: 04-30-2018 08:05 PM by Rogier.)
Post: #14
|
|||
|
|||
RE: (11C) Code guessing game
I'm pretty sure my scoring isn't official Mastermind, but it's what I came up with.
The minor problem is the double scoring of digits of a correct colour AND in the right place. That could easily be solved (multiply by 10 and subtract from the total of correct digits). I just never bothered. I can live with a result "a correct, of which b in the right place". The major problem is that I don't check whether a colour has already been tested and with what kind of result: - not present > ignore for the rest of this turn, - present, wrong place > ignore unless you find one in the right place, then adjust score - present, in the right place > ignore for the rest of this turn I don't remember why I chose this system (I didn't know all Mastermind rules? Couldn't fit in a better one?). With it's limitations I still think it's one of my better programs and fun to play (and a challenge if you use 10 places, 9 colours, possibility of one or more colours appearing more than once). Playing your program with a slightly different set of rules should be fun too. I'm going to give it a try. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)