示例#1
0
 def test_lower_right_bishop(self):
   possible_moves = calculate_bishop("h", "1")
   self.assertEqual(possible_moves, ["a8","b7","c6","d5","e4","f3","g2"])
示例#2
0
 def test_lower_left_bishop(self):
   possible_moves = calculate_bishop("a", "1")
   self.assertEqual(possible_moves, ["b2","c3","d4","e5","f6","g7","h8"])
示例#3
0
 def test_upper_left_bishop(self):
   possible_moves = calculate_bishop("a", "8")
   self.assertEqual(possible_moves, ["b7","c6","d5","e4","f3","g2","h1"])
示例#4
0
 def test_upper_right_bishop(self):
   possible_moves = calculate_bishop("h", "8")
   self.assertEqual(possible_moves, ["a1","b2","c3","d4","e5","f6","g7"])
示例#5
0
 def test_bishop(self):
   possible_moves = calculate_bishop("c", "4")
   self.assertEqual(possible_moves, ["a2","a6","b3","b5","d3","d5","e2","e6",
                                     "f1","f7","g8"])