Guest User

Untitled

a guest
May 23rd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. if (solution[i].equals(colors[0][i]))
  2. {
  3.     s = "1" + s;
  4. }
  5. else
  6. {
  7.         for (int j = 0; j < 4; j++)
  8.     {
  9.             if (colors[0][j].equals(solution[j]))
  10.         {
  11.                         inSolution = true;
  12.         }
  13.     }
  14.          //close for loop and if statement
  15.         if (inSolution)
  16.     {
  17.                 s = s + "0";
  18.         inSolution = false;
  19.         }
  20.     else
  21.     {
  22.         s = s + "2";
  23.         }
  24. }
Add Comment
Please, Sign In to add comment