I've been bothered by certain instances where the color has already been unwrapped from an Option<Color> but a subsequent call takes an Option, so you have to rewrap it to call the method. I might be overthinking this… For the Board::*_color_is_in_check set of methods, try out this naming convention: active_color_is_in_check() : Operates directly on the Board's active color, no unwrapping required color_is_in_check() : Takes an Option<Color> and unwraps it with the active color if None is given unwrapped_color_is_in_check() : Takes a Color and operates on it. This method is called by the two above, but is also public. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |