INDAPlus21 / INDAPlus21/emilhul-chess-gui

Pass

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

Description

**Very well done Emil!**

Nice interface. I like your additional features!

The code is generally good structured, but would benefit from helper functions to reduce lines.

Good job! :D

I managed to find some small optimisation possibilities. Example:
_Your code_:
```rust
// Draw piece
//...
let sprite = match self.sprites.iter().find(|x| x.0 == _piece) {
Some(x) => x.1.clone(),
_ => panic!("No piece"),
};
graphics::draw(
ctx,
&sprite,
/*...*/
)
```
_Without unnessecery cloning_:
```rust
// Draw piece
//...
graphics::draw(
ctx,
match self.sprites.iter().find(|x| x.0 == _piece) {
Some(x) => &x.1,
_ => panic!("No piece"),
},
/*...*/
)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the drawing code containing the sprite lookup shown in the issue and review the surrounding implementation for the suggested clone reduction and helper extraction. Confirm the intended scope with the maintainer, since no files, tests, or completion criteria are specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.