Exemple #1
0
 def trialMoveSelectedEvent(self, tilePosition):
     # If a tile has been selected for the start of the path, and the specified path tile is on the board
     if (
         self.pathSelectionModel is not None
         and self.tilePositionModel.contains(tilePosition)
         and not self.pathSelectionModel.doesExtendedSelectionContain(tilePosition)
     ):
         logging.debug("Trial move to %s", tilePosition)
         pieceData = self.piecesModel.getDataForPiecesAt(self.pathSelectionModel.getPrimarySelection())[0]
         self.selectionController.setInfoTiles(
             self.tilePositionModel.positionsOnBoardIn(
                 HexCoordSys.getShortestTilePathBetween(self.pathSelectionModel.getPrimarySelection(), tilePosition)
             ),
             self.pathSelectionModel,
             pieceData.movingColour,
             type(PieceView((), ())),
         )