add scala for loop test case and solve the eight queens problems