User Tools

Site Tools


wordel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wordel [2023/10/31 00:41] frchriswordel [2023/10/31 00:49] (current) frchris
Line 41: Line 41:
         String answerLetter = answer.substring(i,i+1);         String answerLetter = answer.substring(i,i+1);
         String guessLetter = guess.substring(i,i+1);              String guessLetter = guess.substring(i,i+1);     
-        if(answerLetter.equals(guessLetter))  
-        clue += answerLetter; 
-        else if (answer.indexOf(guessLetter) > -1) 
-        clue += "+"; 
-        else  
-        clue += "_"; 
                    
 +                 /// YOUR CODE HERE
          }          }
                    
Line 55: Line 50:
  public Color getLetterColor(int i, String guess) {  public Color getLetterColor(int i, String guess) {
  Color color = Color.BLACK;  Color color = Color.BLACK;
-  String answerLetter = answer.substring(i,i+1);+ String answerLetter = answer.substring(i,i+1);
     String guessLetter = guess.substring(i,i+1);          String guessLetter = guess.substring(i,i+1);     
     if(answerLetter.equals(guessLetter))      if(answerLetter.equals(guessLetter)) 
Line 72: Line 67:
  
 </code> </code>
 +
 +=== WordelColorTest ===
 +{{ ::wordelcolortester.java |WordelColorTester.java}}
  
 === WordelGame.java === === WordelGame.java ===
 +
 +{{ ::wordelgame.java |WordelGame.java}}
wordel.1698727270.txt.gz · Last modified: 2023/10/31 00:41 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki