Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String Enter(String s1, String s2, String s3, String s4)
- {
- for (int q = 0; q < 4; q++) {
- if (q == 0) {
- colors[0][q] = s1;
- }
- if (q == 1) {
- colors[0][q] = s2;
- }
- if (q == 2) {
- colors[0][q] = s3;
- }
- if (q == 3) {
- colors[0][q] = s4;
- }
- }
- for (int i = 0; i < 4; i++) {
- if (solution[i].equals(colors[0][i])) {
- s = "1" + s;
- }
- else
- {
- for (int j = 0; j < 4; j++)
- {
- if(colors[0][i].equals(solution[j]))
- {
- inSolution = true;
- }
- }
- if(inSolution == true)
- {
- s = s + "0";
- }
- else
- {
- s = s + "2";
- }
- }
- if(colors[0][i].equals("1111"))
- {
- //something
- }
- }
- return s;
- }
- public static String colors[][] = new String[10][4];
- public static String solution[] = new String[4];
- public static boolean inSolution = false;
- public static String s = "";
Add Comment
Please, Sign In to add comment