Exemple #1
0
 def __init__(self, word, coord):
     """
     Initializes a Move with the given string (only alphabetic characters)
     and coordinate. Coord can either be a Coordinate or a string, which
     will be converted to a Coordinate. Word is a string, following the
     rules of the class doc: lowercase means blank, parentheses mean already
     played. Example: PORt(MANTEaU)X
     """
     
     tilelist = self.tiles_from_string(word)
     
     self.__all_tiles = tilelist[0]
     self.__just_played_tiles = tilelist[1]
     
     if isinstance(coord, str):
         self.__coord = Coordinate.initialize_from_string(coord)
     else:
         self.__coord = coord