public void RestoreCaptured(bool triggerEvents = true) { captured = false; currentTile.SetCurrentPiece(this); if (pieceCapturedStateChanged != null && triggerEvents) { pieceCapturedStateChanged(captured); } moveManager.RegisterPiece(this); }
public Piece(PieceColor color, Tile tile, MoveManager moveManager) { this.pieceColor = color; this.moveManager = moveManager; initialTile = tile; SetTile(tile); moveManager.RegisterPiece(this); }