コード例 #1
0
 def test_king_1x1_1(self):
     i = 1
     result = trim_threatened(king_threats(1,1,i,1,{i}), 1)
     self.assertEqual(result, {1})
コード例 #2
0
 def test_king_1x4_3(self):
     i = 3
     result = trim_threatened(king_threats(1,4,i,3,{i}), 4)
コード例 #3
0
 def test_king_3x3_1(self):
     result = trim_threatened(king_threats(3,3,1,1,{1}), 9)
     self.assertEqual(result, {1,2,4,5})
コード例 #4
0
 def test_king_3x3_5(self):
     result = trim_threatened(king_threats(3,3,5,2,{5}), 9)
     self.assertEqual(result, {1,2,3,4,5,6,7,8,9})
コード例 #5
0
 def test_king_2x2_1(self):        
     result = trim_threatened(king_threats(2,2,1,1,{1}), 4)
     self.assertEqual(result, {1,2,3,4})