-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ci badge * CI for docs * index for github pages * Fix clippy warnings * Add cli image README * Rename test_apply_move
- Loading branch information
1 parent
0f161cf
commit 00414d1
Showing
20 changed files
with
202 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
docs: | ||
name: docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
|
||
- name: Build documentation | ||
run: cargo doc --no-deps | ||
- name: Generate index | ||
run: echo "<head><meta http-equiv=\"Refresh\" content=\"0; url='https://joajfreitas.github.io/fchess/fchess/index.html'\" /></head>" > target/doc/index.html | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,88 @@ | ||
# fchess | ||
|
||
## Run | ||
![https://github.com/joajfreitas/fchess/actions/workflows/main.yaml/badge.svg](https://github.com/joajfreitas/fchess/actions/workflows/main.yaml/badge.svg) | ||
|
||
cli tool: | ||
fchess is a work in progress chess engine written in Rust. | ||
|
||
|
||
## Implementation status | ||
|
||
|
||
## Running | ||
|
||
fchess provides a uci interface: | ||
``` | ||
λ cargo run --bin uci | ||
``` | ||
cargo run --bin cli | ||
|
||
|
||
Alternativelly you can play directly in the terminal: | ||
|
||
``` | ||
λ cargo run --bin cli | ||
┌───┬───┬───┬───┬───┬───┬───┬───┐ | ||
8 │ ♖ │ ♘ │ ♗ │ ♕ │ ♔ │ ♗ │ ♘ │ ♖ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
7 │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
6 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
5 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
4 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
3 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
2 │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
1 │ ♜ │ ♞ │ ♝ │ ♛ │ ♚ │ ♝ │ ♞ │ ♜ │ | ||
└───┴───┴───┴───┴───┴───┴───┴───┘ | ||
a b c d e f g h | ||
> e2e4 | ||
┌───┬───┬───┬───┬───┬───┬───┬───┐ | ||
8 │ ♖ │ ♘ │ ♗ │ ♕ │ ♔ │ ♗ │ ♘ │ ♖ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
7 │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
6 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
5 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
4 │ │ │ │ │ ♟︎ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
3 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
2 │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ │ ♟︎ │ ♟︎ │ ♟︎ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
1 │ ♜ │ ♞ │ ♝ │ ♛ │ ♚ │ ♝ │ ♞ │ ♜ │ | ||
└───┴───┴───┴───┴───┴───┴───┴───┘ | ||
a b c d e f g h | ||
=> Book move | ||
┌───┬───┬───┬───┬───┬───┬───┬───┐ | ||
8 │ ♖ │ ♘ │ ♗ │ ♕ │ ♔ │ ♗ │ ♘ │ ♖ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
7 │ ♙ │ ♙ │ ♙ │ ♙ │ │ ♙ │ ♙ │ ♙ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
6 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
5 │ │ │ │ │ ♙ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
4 │ │ │ │ │ ♟︎ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
3 │ │ │ │ │ │ │ │ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
2 │ ♟︎ │ ♟︎ │ ♟︎ │ ♟︎ │ │ ♟︎ │ ♟︎ │ ♟︎ │ | ||
├───┼───┼───┼───┼───┼───┼───┼───┤ | ||
1 │ ♜ │ ♞ │ ♝ │ ♛ │ ♚ │ ♝ │ ♞ │ ♜ │ | ||
└───┴───┴───┴───┴───┴───┴───┴───┘ | ||
a b c d e f g h | ||
``` | ||
|
||
tests: | ||
## Tests | ||
|
||
``` | ||
cargo test | ||
λ cargo test | ||
λ ./scripts/run_move_generation_tests.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cargo run --release --bin test_apply_move -- testcases/pawns.yaml | ||
cargo run --release --bin test_apply_move -- testcases/standard.yaml | ||
cargo run --release --bin test_apply_move -- testcases/castling.yaml | ||
cargo run --release --bin test_apply_move -- testcases/famous.yaml | ||
cargo run --release --bin test_apply_move -- testcases/promotions.yaml | ||
cargo run --release --bin test_apply_move -- testcases/taxing.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.