If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Mastermind java game (non object-oriented version)

hi all

i am a student 6 weeks into learning java.

i have been attempting to create a simple Mastermind game using java, non object oriented version. However, I have been stuck at the part where the program counts the "number of pegs that are of the correct color but placed at the wrong position". It either overlaps with the "number of pegs of the right color at the correct position" or it under-counts.