private void NextActionClickHighlight(ref ClickPieceStepState token) { var pressState = new PressStepState { PieceEntityId = token.ClickedPiece.ID.entityID, PiecePressState = token.ClickedPiece.Highlight.IsHighlighted ? PiecePressState.UNCLICKED : PiecePressState.CLICKED, AffectedTiles = destinationTileService.CalcDestinationTileLocations(token.ClickedPiece, entitiesDB) }; decideClickImmobileCaptureSequence.Next(this, ref pressState, (int)StepAB.B); }
private void NextActionClickHighlight(PieceEV piece) { var pressState = new PressStepState { PieceEntityId = piece.ID.entityID, PiecePressState = piece.Highlight.IsHighlighted ? PiecePressState.UNCLICKED : PiecePressState.CLICKED, AffectedTiles = destinationTileService.CalcDestinationTileLocations(piece, entitiesDB) }; towerModalConfirmSequence.Next(this, ref pressState, (int)TowerAnswerState.CLICK_HIGHLIGHT); }
public void Step(ref PressStepState token, int condition) { // Purpose of this engine is to ensure only a single piece per team is highlighted at any given time // If the goal is to UN-highlight a piece, there is no need to check for other highlighted pieces if (token.PiecePressState == PiecePressState.UNCLICKED) { return; } PieceEV piece = pieceFindService.FindPieceEV(token.PieceEntityId, entitiesDB); DeHighlightPlayerPiecesAndTiles(piece); UnHighlightHandPieces(); }
private void NextActionClickHighlight(ref ClickPieceStepState token) { TurnEV currentTurn = turnService.GetCurrentTurnEV(entitiesDB); // Determine PiecePressState, click or un-click, and destination tiles var pressState = new PressStepState { PieceEntityId = token.ClickedPiece.ID.entityID, PiecePressState = token.ClickedPiece.Highlight.IsHighlighted ? PiecePressState.UNCLICKED : PiecePressState.CLICKED, AffectedTiles = destinationTileService.CalcDestinationTileLocations( token.ClickedPiece, entitiesDB, null, currentTurn.TurnPlayer.PlayerColor == token.ClickedPiece.PlayerOwner.PlayerColor) }; clickSequence.Next(this, ref pressState, (int)ClickState.CLICK_HIGHLIGHT); }
private void NextActionClick() { ModalEV modal = modalService.FindModalEV(entitiesDB); TileEV clickedTile = FindDestinationTile(modal); PieceEV clickedPiece = FindTopPiece(clickedTile); TurnEV currentTurn = turnService.GetCurrentTurnEV(entitiesDB); // Determine PiecePressState, click or un-click, and destination tiles var token = new PressStepState { PieceEntityId = clickedPiece.ID.entityID, PiecePressState = clickedPiece.Highlight.IsHighlighted ? PiecePressState.UNCLICKED : PiecePressState.CLICKED, AffectedTiles = destinationTileService.CalcDestinationTileLocations( clickedPiece, entitiesDB, null, currentTurn.TurnPlayer.PlayerColor == clickedPiece.PlayerOwner.PlayerColor) }; captureStackModalAnswerSequence.Next(this, ref token, (int)MoveState.CLICK); }