//check all peices for legal moves....brute force, no intelligence here for(i = 0; i<12; i++) { System.out.print("trying peice at position" + mypeices[i] + "HAHAH!!!"); //check each peice for legal moves for (j = 1; j <33; j++) //the whole board is a possible move-to point for this peice { trymove[0] = mypeices[i]; trymove[1] = j; System.out.println("trying move " + trymove +" i hope it works "); Board b = new Board(board, isWhite); if (b.updateBoard(trymove) == null) { //validmoves.add(trymove); System.out.print("NULLL!!!!!"); } else { validmove=trymove; System.out.print("SUCCESS!!!!"); } } }