コード例 #1
0
    def test_end_of_path(self):
        paths = [('s1', 'e2'), ('s2', 'w1'), ('e1', 'n2'), ('n1', 'w2')]
        tile = Tile(paths)

        self.assertAlmostEqual(tile.end_of_path('s1'), 'e2')
        self.assertAlmostEqual(tile.end_of_path('e2'), 's1')

        hand_tile = HandTile(paths)
        self.assertAlmostEqual(hand_tile.end_of_path('e1'), 'n2')
        self.assertAlmostEqual(hand_tile.end_of_path('n2'), 'e1')