// so loop goes here, going through all of the file's piecesfor ([...stuff...]) { // your magical code that helps me go here! // the two test case for b[i] is -1, and -16, which is 255 and 240 respectively // so for the first four, for both -1 and -16, the print statements should // either both true, or both false, what they return is irrelevant, I just // want the boolean values to be the same System.out.println("Has piece " + ++count + ": " + ((tmp & 1) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 2) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 4) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 8) != 0)); // for the next four here, since the user only has piece 1-4 in the -16 (or 240) // case, the value returned here should be different in comparison with the -1 // (or 255) case, since the -1 indicates that the user has ALL the pieces System.out.println("Has piece " + ++count + ": " + ((tmp & 16) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 32) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 64) != 0)); System.out.println("Has piece " + ++count + ": " + ((tmp & 128) != 0));}