Skip to content

Commit

Permalink
Merge branch 'main' into mouse_click
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mauran authored Nov 17, 2024
2 parents ef91d71 + 3f833e6 commit e377988
Show file tree
Hide file tree
Showing 25 changed files with 975 additions and 371 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chess-tui"
version = "1.2.1"
version = "1.4.0"
authors = ["Thomas Mauran"]
license = "MIT"
edition = "2021"
Expand Down
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A chess TUI implementation in rust 🦀
</div>

![board](./examples/demo.gif)
![board](./examples/play_against_white_bot.gif)

![GitHub CI](https://github.com/thomas-mauran/chess-tui/actions/workflows/flow_test_build_push.yml/badge.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -55,9 +55,8 @@ pacman -S chess-tui
<summary>Helper menu</summary>
<img src="./examples/helper.gif" alt="Helper menu" />
</details>

<details>
<summary>Piece moves and checkmate</summary>
<summary>Local 2 player mode</summary>
<img src="./examples/demo.gif" alt="Helper menu" />
</details>
<details>
Expand All @@ -73,17 +72,13 @@ pacman -S chess-tui
no demo available yet
</details>
<details>
<summary>Play against a chess engine</summary>
<img src="./examples/play_against_bot.gif" alt="Play against a chess engine" />
</details>

### Roadmap

You can find the roadmap of the project [here](https://github.com/users/thomas-mauran/projects/4) if you want to contribute.

### Crates.io
<summary>Play against any UCI chess engine as black or white</summary>
<h3>Play the white pieces</h3>
<img src="./examples/play_against_white_bot.gif" alt="Play against a chess engine as white" />

The project is also available on crates.io [here](https://crates.io/crates/chess-tui)
<h3>Play the black pieces</h3>
<img src="./examples/play_against_black_bot.gif" alt="Play against a chess engine as black" />
</details>

### Connect a chess engine

Expand All @@ -97,3 +92,11 @@ chess-tui -e /your/bin/path

Here I installed stockfish using homebrew and gave chess-tui the path the the engine binary.
This command will store in your home directory the chess engine path so you don't have to relink it everytime !

### Roadmap

You can find the roadmap of the project [here](https://github.com/users/thomas-mauran/projects/4) if you want to contribute.

### Crates.io

The project is also available on crates.io [here](https://crates.io/crates/chess-tui)
Binary file added examples/demo-two-player.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions examples/demo-two-player.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
Output examples/demo-two-player.gif

Require echo

Set Margin 100
Set MarginFill "#674EBB"

Set BorderRadius 10
Set Shell zsh

Set FontSize 14
Set Width 1920
Set Height 1080

Set WindowBar Colorful
Set WindowBarSize 40

Type "cargo run" Sleep 500ms Enter

Sleep 0.5s
Down @0.8s
Down @0.8s
Down @0.8s
Down @0.8s
Down @0.8s
Space @0.8s
Sleep 1.5s

Down @0.8s
Down @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s

Sleep 0.8s
Left @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s

Down @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s
Sleep 0.8s

Right @0.8s
Right @0.8s
Right @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s
Sleep 0.8s

Left @0.8s
Space @0.8s
Sleep 0.8s
Right @0.8s
Right @0.8s
Space @0.8s
Sleep 0.8s

Up @0.8s
Right @0.8s
Right @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s
Sleep 0.8s


Up @0.8s
Up @0.8s
Up @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s
Sleep 0.8s
Binary file modified examples/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 0 additions & 109 deletions examples/demo.tape

This file was deleted.

Binary file modified examples/helper.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/helper.tape
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Type "cargo run" Sleep 500ms Enter
Sleep 2s
Down @0.3s
Down @0.3s
Down @0.3s
Space @0.3s
Sleep 1s

Expand Down
Binary file added examples/play_against_black_bot.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions examples/play_against_black_bot.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Output examples/play_against_black_bot.gif

Require echo

Set Margin 100
Set MarginFill "#674EBB"

Set BorderRadius 10
Set Shell zsh

Set FontSize 14
Set Width 1920
Set Height 1080

Set WindowBar Colorful
Set WindowBarSize 40

Type "cargo run" Sleep 500ms Enter

Sleep 2s
Down @0.8s
Space @0.8s
Sleep 1s

Right @0.8s
Space @0.8s
Sleep 0.3s

Down @0.8s
Down @0.8s
Space @0.8s
Sleep 0.3s
Space @0.8s

Right @0.8s
Space @0.8s
Sleep 0.3s
Space @0.8s

Right @0.8s
Space @0.8s
Sleep 0.3s
Space @0.8s

Left @0.8s
Left @0.8s
Left @0.8s
Left @0.8s
Left @0.8s
Space @0.8s
Sleep 0.8s
Space @0.8s
Sleep 0.8s

Binary file removed examples/play_against_bot.gif
Binary file not shown.
57 changes: 0 additions & 57 deletions examples/play_against_bot.tape

This file was deleted.

Binary file added examples/play_against_white_bot.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e377988

Please sign in to comment.