Esempio n. 1
0
 def test_can_build_solution_from_letters_dictionary(self):
     crossword = Crossword()
     crossword.size(3)
     letters = {}
     letters[0, 0] = "A"
     letters[1, 0] = "B"
     letters[2, 0] = ""
     letters[0, 1] = ""
     letters[1, 1] = "C"
     letters[2, 1] = "D"
     letters[0, 2] = "E"
     letters[1, 2] = "F"
     letters[2, 2] = "G"
     crossword.build_solution(letters)
     self.assertEquals(crossword.across_solutions[0], "AB")
     self.assertEquals(crossword.across_solutions[2], "EFG")
     self.assertEquals(crossword.down_solutions[0], "BCF")