You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test("convoluted path") {
val lines = List(". X X . ."
," X . X . X"
," . X . X ."
," . X X . ."
," O O O O O")
Connect(mkBoard(lines)).result should be (Some(Color.Black))
}
There are 9 X's but only 5 O's. Then the X player (Black) must have cheated! A cheater should not win.
The 5th test case is:
test("rectangle - black wins") {
val lines = List(". O . ."
," O X X X"
," O X O ."
," X X O X"
," . O X .")
Connect(mkBoard(lines)).result should be (Some(Color.Black))
}
There are 8 X's but only 6 O's. The player X must have cheated. In addition, there are 5 rows but only 4 columns. The numbers of the rows and the columns should be the same to be fair for the two players. The 6th test case has the same problem with 5 rows but 4 columns:
test("rectangle - white wins") {
val lines = List(". O . ."
," O X X X"
," O O O ."
," X X O X"
," . O X .")
Connect(mkBoard(lines)).result should be (Some(Color.White))
}
By the way, with the current unreasonable test cases, I have still written my code by the rules to pass all of the tests. But these are unfair games.
I really appreciate all of your kind efforts to establish and maintain this wonderful website. I have learned a lot by doing the exercises and from other programmers' comments.
The text was updated successfully, but these errors were encountered:
Thanks. I notice that the same test cases are included in other language tracks. The Go and Haskell Connect exercises also have these same test case. I'll have to check to see how to proceed. We should probably be consistent..
Thanks again.
@kytrinyx : Could you weigh in on if this issue should be addressed in all the language tracks that implement Connect (or not addressed at all)?
@ricemery I think we should move this discussion to the x-common repository, figure out what the generic "right answer" is, and then write up an issue that can be submitted to all the affected language tracks.
I'll go ahead and copy the relevant part of the discussion over to x-common.
Hello,
in the exercise "Connect", the 4th test case is:
There are 9 X's but only 5 O's. Then the X player (Black) must have cheated! A cheater should not win.
The 5th test case is:
There are 8 X's but only 6 O's. The player X must have cheated. In addition, there are 5 rows but only 4 columns. The numbers of the rows and the columns should be the same to be fair for the two players. The 6th test case has the same problem with 5 rows but 4 columns:
By the way, with the current unreasonable test cases, I have still written my code by the rules to pass all of the tests. But these are unfair games.
I really appreciate all of your kind efforts to establish and maintain this wonderful website. I have learned a lot by doing the exercises and from other programmers' comments.
The text was updated successfully, but these errors were encountered: