Mahjong programming tests: Difference between revisions

Changed the 13th test from the top as it was 2-shanten and not 1-shanten as suggested in the comment
mNo edit summary
(Changed the 13th test from the top as it was 2-shanten and not 1-shanten as suggested in the comment)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!--What are these mahjong programming tests?-->Every programmer who has previously tackled attempting to test and verify the veracity of his functions should at one point have attempted to run a set of tests.
Every programmer who has previously tackled attempting to test and verify the veracity of his functions should at one point have attempted to run a set of tests. The purpose of a test is to obtain a series of valid results from a program, in order to verify the validity of the function meant to return values. A tell-tale pattern may be included for rapid verification (true, false, true, false, ...).


== Shanten tests ==
== Shanten tests ==
Line 24: Line 24:
"3,17,33,37,53,71,72,101,111,113,117,118,127"
"3,17,33,37,53,71,72,101,111,113,117,118,127"
"3,32,33,37,53,71,72,106,111,113,117,118,127"
"3,32,33,37,53,71,72,106,111,113,117,118,127"
"3,32,34,37,68,71,88,91,111,113,117,118,127"
"3,32,34,37,68,71,88,91,113,114,117,118,127"
"2,32,34,68,71,88,91,112,113,117,118,124,127"
"2,32,34,68,71,88,91,112,113,117,118,124,127"
"1,6,9,41,53,67,77,89,101,111,113,117,127"
"1,6,9,41,53,67,77,89,101,111,113,117,127"
Line 41: Line 41:
"159m159p18s12335z"
"159m159p18s12335z"
"199m159p19s12335z"
"199m159p19s12335z"
"199m199p55s12335z"
"199m199p55s22335z"
"199m99p55s223355z"
"199m99p55s223355z"
"123m258p258s1235z"
"123m258p258s1235z"
Line 69: Line 69:


13, 17, 29: 6-shanten. Mostly crap, 6 terminals, 1 protogroup, no pair. (14 tiles start)
13, 17, 29: 6-shanten. Mostly crap, 6 terminals, 1 protogroup, no pair. (14 tiles start)
[[Category:Mahjong algorithms]]
4

edits