-
1 Attachment(s)
Master Mind
Hi!
Im Making a game like Master Mind...
The computer chooses 4 colors and then you have to guess them...Its really fun...
theres a small problem though....
When you guess one of the colors correct at the correct position, the computer has to add one black dot at the side, and when you gues one color correct but on the wrong place it adds a white dot...
the problem with this is that if for example you guess the first color correct and the 3rd color is the same but you didnt gues that color at all it shall not add a white dot for that color (being half correct and fully correct at the same time)...
also if you guess the first correct and then guess that color later but its not at any more place in the computers colors it shall not get a white dot
its pretty hard to explain but youll probably get the idea if you play it
-
I made a complete mastermind game when I was up at the cottage this year, it works completely. I can give you the source if I still have it...
-
sure!
that would be great!
-
So.. it works like so:
colors = numbers
random: 1314
upicked: 1333
Ur saying it adds black + white for the same one??
Simply have it check the main position for fully correct, then the other ones for half. Once you find one, exit the function.
Oh, if you have 2 white dots and the user picks 2 whites.. and it checks wrong oen first.. you might want to make sure it checks all of same color for best result first.
-
Just remembered that we formatted the laptop a few weeks ago bud... sorry but I can't help :(
-
1 Attachment(s)
Hi all,
I'm not sure if I've understood what you mean but the game looks like one I mad sometime ago mybe that is what you need
-
KingArthur, your project looks alot like mine only i've got 6 possible colors to use in 4 places and if you guess a color that on the wrong place you'll get a 'half-correct' color for that one...
then the white and black boxes that tells if you've guessed correct, should not be on the correct place...they should be sorted to show fist black, then white, then grey (makes it harder to figure out which colors are correct).
-
1 Attachment(s)
i've made an illustration that shows how this is to be done...
its kinda hard to explain so i hope this image makes it easier.
the four colors in the top are the randomized colors thats hidden and that the player is supposed to find out in the correct order!
the other four colors are just an example of some colors chosen by a player.
the four black/grey/white colored dots at the right tells how many colors are correct at the correct place (black), and how many colors that are correct at the wrong place (white) (not counting a color twice (the last red does not count as both correct and half-correct)).
grey is when a color is not correct.
http://www.vbforums.com/attachment.p...postid=1348679