INDAPlus21 / INDAPlus21/alholmbe-chess

Pass

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Superfint jobbat!!!**

Smart to search for check from the position of the king, rather than from the position of the opponent's pieces.

Also,
```rust
pub fn get_colour(&self) -> Colour {
// figure out how to pattern match the piece kind because this is ugly
match self {
Piece::Pawn(Colour::White) => Colour::White,
Piece::Pawn(Colour::Black) => Colour::Black,
Piece::Rook(Colour::White) => Colour::White,
Piece::Rook(Colour::Black) => Colour::Black,
Piece::Knight(Colour::White) => Colour::White,
Piece::Knight(Colour::Black) => Colour::Black,
Piece::Bishop(Colour::White) => Colour::White,
Piece::Bishop(Colour::Black) => Colour::Black,
Piece::Queen(Colour::White) => Colour::White,
Piece::Queen(Colour::Black) => Colour::Black,
Piece::King(Colour::White) => Colour::White,
Piece::King(Colour::Black) => Colour::Black,
}
}
```
can be reduced to
```rust
pub fn get_colour(&self) -> Colour {
match self {
Piece::Pawn(_colour) => _colour,
Piece::Rook(_colour) => _colour,
Piece::Knight(_colour) => _colour,
Piece::Bishop(_colour) => _colour,
Piece::Queen(_colour) => _colour,
Piece::King(_colour) => _colour,
}
}
```

My only complaint is a total lack of doc-comments.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by locating the Rust Piece type and its get_colour method, then inspect the surrounding public API for undocumented items. Done means the relevant public code has useful Rust doc-comments, with the scope confirmed before editing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.