Rules and procedures:
This is a guessing and logic game.
There are 4 unique colors hidden. Your job is to guess them correctly. After you choose your 4 colors, you click on the arrow for that row to be evaluated. The 4 small holes on the right side are the results and they show how close to the right answer you were. A black hole means 1 of the 4 colors is placed in the correct spot. A white hole means 1 of the 4 colors is included in the answer but is not placed in the correct spot. The results are filled in no particular order. You win when you correctly guess all 4 colors. You lose when you cannot guess after 10 turns.
When you win, the results will show 1 blue hole.
How to play:
To place colors, you click on the desired color and then click on the desired hole.
This was a fun little game, although it would be nice if the colors moved down with you, its a bit of a pain to have to go all the way up to change the color
I didnt get any lag, but I dont think an automatic check would be that great, in case you misplace something.
Automatic check won’t allow you to look over what you have placed. Too many times do I place a couple colors, look over everything, notice I did something wrong, and hit the “clear” button.
This game was not invented by me, but it is actually an old classic. I may just add more colors for the fun of it but it would make MUCH harder.
I don’t notice a lag O_o
Great suggestion! I don’t like the way it’s set up now either but I couldn’t think of anything better
I’ll implement that and update it.
Thanks for playing!
EDIT: Here is a picture of the MasterMind board that I have:
384MB RAM?!? O_O Well there is nothing in the color choosing code other than doing color.contains(point).
It’s called the Nimbus Look and Feel. The default LAF (that you’re used to) is the Ocean (Metal) Look and Feel. This LAF is not in the public API but you can access it by doing:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
or
UIManager.setLookAndFeel(new com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel());
pretty fun game! I remember playing it when I was little, it was a great deal of fun! I didn’t read your entire post so I had trouble understanding what the different color small circles meant, I thought white ones meant they were correct and black ones that they failed!
@r4king
oh crap why they need to put such long name to access that theme lol
you now, it’s so hard to find $2 DDR1 PC2700 RAM so I could add a bit from 256MB. If a game run smoothly in my pc, it should be too much performance-friendly
Nice! Played real smooth. No complaints, except the distance travelled keeps increasing.
A couple ideas for that: Allow a click on a color of the previous row? Allow one to click the spot multiple times and have this rotate through the colors? A popup palette you can move around? Allow drag-and-drop?
A good friend of mine used to play a game called … omigod, I’ve forgotten it. It will come to me. It was a word-version of Mastermind. Each player picks a five-letter word, and they take turns making five-letter word guesses until they get it. We worked through some basic strategies like coming up with four five-letter words with no duplicate letters (used as a kind of elimination strategy). If I recall correctly, we eventually got good enough where just 5 or 6 guesses was often enough, and we’d spend a lot of time trying to come up with stumper words (glyph, aerie, queue, miaou, xylem), especially if you had a good notion of the strategy the other was using. (Example: if you know they are using an elim strategy and know their favorite wordset, pick one letter from each word in the word you make up. Then, the info they get from the four guesses is nearly worthless.)
Games could take as long as 40 - 50 minutes (for a single game). Nerds! ;D We used a LOT of scratch paper working on the logic.
But yeah, there definitely ARE strategies for dealing with Mastermind rounds with multiples having the same color! It’s hard but it is not random. Elimination strategies can work as there because it is easier to put up a guess with zero matches (very useful info).
Dang, I’m going to have to write my friend and ask him the name. Or, I’ll awaken at 4AM with it and add it here via an edit.
JOTTO! That was the name. (But unlike the wiki description, we gave scores for both exact hits and matches hitting letters that were out of place.)
Check out the wikipedia listing. Knuth had an algorithm to solve it, even with the duplicate pegs, in 5 or 6 turns!
It looks similar to what I was trying to do in Jotto.