-
u know what.... i'm just going to revert back to the original code where the user would have to input a character at a time and submit my assignment... i'm sick of being picky, spent more time trying to fix little glitches that make my programs "nicer" than doing the actual work. and all for a couple xtra points.
listen i appreciate the help but i just gotta focus on the exam now... this has taken me too long
thanks a million.
-
Alright, there was a second place where code was used -- in the "you lose" message. That's why what prints when you lose doesn't seem to match. Sorry.
Also, I was answering questions and forgot to mention that your white/black peg figure-outer is b0rked. Watch:
Code:
Votre coup (essai no 1): bjbv
Couleurs identiques: 1
Coleurs presentes: 1
Votre coup (essai no 2): bbjv
Couleurs identiques: 0
Coleurs presentes: 4
Votre coup (essai no 3): jbbv
Couleurs identiques: 1
Coleurs presentes: 1
Votre coup (essai no 4): bvbj
Couleurs identiques: 1
Coleurs presentes: 1
Votre coup (essai no 5): brbj
Couleurs identiques: 1
Coleurs presentes: 0
Votre coup (essai no 6): vjrr
Couleurs identiques: 1
Coleurs presentes: 1
Desole, la sequence de couleurs a deviner etait jjvj
When I put the j in the wrong spot, I got credit for all three white pegs, even though I should really only have gotten credit for one. (You need a break after present++ to keep that for loop from finding every single other instance of the same color.) Edit: Oh, and if I had typed vjvj, I would have gotten 2 right + 1 present, instead of 3 right, since the first v would have erased the v in the code, and it wouldn't then match the actual v later.