private bool CheckDropToken(ref HandPieceEV handPiece, ref TileEV destinationTile, PieceSide?sideToCheck) { TurnEV currentTurn = turnService.GetCurrentTurnEV(entitiesDB); PieceEV pieceToDrop = pieceFindService.FindFirstPieceByLocationAndType( BoardConst.HAND_LOCATION, handPiece.HandPiece.PieceType, handPiece.HandPiece.Back, entitiesDB); bool returnValue = !currentTurn.Check.CommanderInCheck; if (!returnValue) // Commander is in check { bool singleSideValid = sideToCheck.HasValue && checkService.DropReleasesCheck( pieceToDrop, destinationTile.Location.Location, currentTurn, sideToCheck.Value, entitiesDB); bool eitherSideValid = !sideToCheck.HasValue && ( checkService.DropReleasesCheck( pieceToDrop, destinationTile.Location.Location, currentTurn, PieceSide.FRONT, entitiesDB) || checkService.DropReleasesCheck( pieceToDrop, destinationTile.Location.Location, currentTurn, PieceSide.BACK, entitiesDB)); returnValue = singleSideValid || eitherSideValid; } return(returnValue); }