         self = color.isWhite ? .white : .black
     }
 
+    /// Creates castling rights for `side`.
+    public init(side: Board.Side) {
+        self = side.isKingside ? .kingside : .queenside
+    }
+
     #if swift(>=3)
 
     /// Creates a set of rights from a sequence.

        #endif
    }

}

#if swift(>=3)

    /// Black castling rights.
    public static let black = CastlingRights(Right.black)

    /// Kingside castling rights.
    public static let kingside = CastlingRights(Right.kingside)

    /// Queenside castling rights.
    public static let queenside = CastlingRights(Right.queenside)

    /// The rights.
    private var _rights: Set<Right>

