2d array, plz help, thank you.
Hi... first off all b/c its almost newyear... :-)
But... i have a question.
About 2 dimensional arrays.
I kinda know how to make them but i dont know how to get the right nr in the array
Im making a mastermind program and how i thought for myself. Lets make an intelligent codebreaker to automaticly solve the given random nr's
Ther are 1096 possibilities, there are 5 pegs and 6 different colers in my mastermind game
How can i make an array so that the computer automaticly solves the given nr?
Ive treid to make but i just cant figure out how.
Is your question about how to make any kind of solution work (even a stupid one), or do you also want some kind of intelligent algorithm?
by the way, you're doing it the C-structural way, or using OO concepts?
Hi, thanks you for replying,
The program that im trying to make:
You enter a number and the computer is trying to guess it with the less possible guesses
there are 4 "pions" with 6 colors so where are 1296 possiblities and NOT 1096 like ive said in my previous posts (sorry i was confused)
e.g. i use the number: 4216
The length of the numbers are the pions (1111 = 4 pions)
The 4/2/1/6/ means the diffrent colors like:
4 = red,
2 = cyan,
1 = white
4 = red
Im still trying to find the best method for it but i still havent found anything usefull,
The only thing i know is to use some 2d arraylist?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center