Adding 8puzzle problem with test cases