示例#1
0
 def test_1st_example_validation(self):
     test_field = Field('*...\n....\n.*..\n....')
     self.assertEquals('*100\n2210\n1*10\n1110', test_field.resolve())
示例#2
0
 def test_two_rows_with_a_mine(self):
     test_field = Field(".\n*")
     self.assertEquals("1\n*", test_field.resolve())
示例#3
0
 def test_two_safe_rows(self):
     test_field = Field(".\n.")
     self.assertEquals("0\n0", test_field.resolve())
示例#4
0
 def test_two_cells_with_one_bomb(self):
     test_field = Field(".*")
     self.assertEquals("1*", test_field.resolve())
示例#5
0
 def test_two_safe_cases(self):
     test_field = Field("..")
     self.assertEquals("00", test_field.resolve())
示例#6
0
 def test_add_safe_case(self):
     test_field = Field(".")
     self.assertEquals("0", test_field.resolve())