Guest User

Untitled

a guest
Aug 28th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. # Unsolved
  2.  
  3. test.expect(isSolved([[0,3,3],
  4. [3,3,3],
  5. [3,3,3]]) is -1)
  6.  
  7. test.expect(isSolved([[3,0,3],
  8. [3,3,3],
  9. [3,3,3]]) is -1)
  10.  
  11. test.expect(isSolved([[3,3,0],
  12. [3,3,3],
  13. [3,3,3]]) is -1)
  14.  
  15. test.expect(isSolved([[3,3,3],
  16. [0,3,3],
  17. [3,3,3]]) is -1)
  18.  
  19. test.expect(isSolved([[3,3,3],
  20. [3,0,3],
  21. [3,3,3]]) is -1)
  22.  
  23. test.expect(isSolved([[3,3,3],
  24. [3,3,0],
  25. [3,3,3]]) is -1)
  26.  
  27. test.expect(isSolved([[3,3,3],
  28. [3,3,3],
  29. [0,3,3]]) is -1)
  30.  
  31. test.expect(isSolved([[3,3,3],
  32. [3,3,3],
  33. [3,0,3]]) is -1)
  34.  
  35. test.expect(isSolved([[3,3,3],
  36. [3,3,3],
  37. [3,3,0]]) is -1)
  38.  
  39. # X Across
  40.  
  41. test.expect(isSolved([[1,1,1],
  42. [3,3,3],
  43. [3,3,3]]) is 1)
  44.  
  45. test.expect(isSolved([[3,3,3],
  46. [1,1,1],
  47. [3,3,3]]) is 1)
  48.  
  49. test.expect(isSolved([[3,3,3],
  50. [3,3,3],
  51. [1,1,1]]) is 1)
  52.  
  53. # X Down
  54.  
  55. test.expect(isSolved([[1,3,3],
  56. [1,3,3],
  57. [1,3,3]]) is 1)
  58.  
  59. test.expect(isSolved([[3,1,3],
  60. [3,1,3],
  61. [3,1,3]]) is 1)
  62.  
  63. test.expect(isSolved([[3,3,1],
  64. [3,3,1],
  65. [3,3,1]]) is 1)
  66.  
  67. # X Diagonal
  68.  
  69. test.expect(isSolved([[1,3,3],
  70. [3,1,3],
  71. [3,3,1]]) is 1)
  72.  
  73. test.expect(isSolved([[3,3,1],
  74. [3,1,3],
  75. [1,3,3]]) is 1)
  76.  
  77. # O Across
  78.  
  79. test.expect(isSolved([[2,2,2],
  80. [3,3,3],
  81. [3,3,3]]) is 2)
  82.  
  83. test.expect(isSolved([[3,3,3],
  84. [2,2,2],
  85. [3,3,3]]) is 2)
  86.  
  87. test.expect(isSolved([[3,3,3],
  88. [3,3,3],
  89. [2,2,2]]) is 2)
  90.  
  91. # O Down
  92.  
  93. test.expect(isSolved([[2,3,3],
  94. [2,3,3],
  95. [2,3,3]]) is 2)
  96.  
  97. test.expect(isSolved([[3,2,3],
  98. [3,2,3],
  99. [3,2,3]]) is 2)
  100.  
  101. test.expect(isSolved([[3,3,2],
  102. [3,3,2],
  103. [3,3,2]]) is 2)
  104.  
  105. # O Diagonal
  106.  
  107. test.expect(isSolved([[2,3,3],
  108. [3,2,3],
  109. [3,3,2]]) is 2)
  110.  
  111. test.expect(isSolved([[3,3,2],
  112. [3,2,3],
  113. [2,3,3]]) is 2)
  114.  
  115. # Cat's Game
  116.  
  117. test.expect(isSolved([[1,2,1],
  118. [2,1,2],
  119. [2,1,2]]) is 0)
Advertisement
Add Comment
Please, Sign In to add comment