public void testGuess()
	{
		AttemptRow attempt = attempts[attempted]; //the attempt being worked with
		int correctPosition = 0;
		int incorrectPosition = 0;
		
		for (int i = 0; i < CODE_LENGTH; i++) //go through guessed code
		{
			if (!attempt.pegWasChecked(i)) //to avoid multiple hint pegs if matching color is in the guess code multiple times
			{
				if (attempt.getGuessValue(i) == code[i].getValue()) //correct position
				{
					correctPosition++;
					attempt.setChecked(i, true); //don't use guess peg again
					code[i].setChecked(true); //don't use answer peg again
				}
				else 
				{
					for (int j = 0; j < CODE_LENGTH; j++) //find incorrect position pegs
					{
					   //first condition is to avoid multiple hint pegs if matching color is in answer code multiple times
						if (!(code[j].wasChecked() || attempt.pegWasChecked(i)) && attempt.getGuessValue(i) == code[j].getValue())
						{
							if (!(attempt.getGuessValue(j) == code[j].getValue())) //correct position hints take precedence
							{
								incorrectPosition++;
								attempt.setChecked(i, true);
								code[j].setChecked(true);
							}
							else
							{
								correctPosition++;
								attempt.setChecked(j, true);
								code[j].setChecked(true);
							}
						}
					}
				}
			}
		}
		
		attempt.setHint(correctPosition, incorrectPosition);
		
		attempted++; //attempt was made
		
		setNextState(correctPosition);	
	}