INDAPlus21 / INDAPlus21/carlch-chess

Pass

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

_I recognise the struggle, därför får du inte komplettering._

## Komplettering (egentligen inte) (som den hade sett ut)

**Almost there!**

To get _Pass_, I would like you to
1) Test all of the basic piece movements.
2) Test piece capture.
3) Include `assert` macros in your current tests to actually make them functional.

Tips:
```rust
let mut row_string: String = match row {
0 => "A",
1 => "B",
2 => "C",
3 => "D",
4 => "E",
5 => "F",
6 => "G",
7 => "H",
_ => "A",
}
.to_owned();

let col_string: &str = match column {
0 => "1",
1 => "2",
2 => "3",
3 => "4",
4 => "5",
5 => "6",
6 => "7",
7 => "8",
_ => "1",
};

row_string.push_str(&col_string);
row_string
```
can be reduced to
```rust
let mut row =
// Convert index as a hexdecimal digit.
std::char::from_digit((
if row < 8 { row } else { 0 }
) + 10, 16).unwrap();

format!("{}{}", row, (if column < 8 { column } else { 0 }) + 1)
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current Rust tests and the code implementing basic piece movement, capture, and coordinate formatting. Run the existing test suite, then add coverage for every basic movement and capture case and make the current tests use assert macros; done means these behaviors are verified by passing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.