fixed out of bounds error in both Puzzle.java and part2.java