https://github.com/jusexton/checke-rs
Checkers engine written in the rust programming language!
https://github.com/jusexton/checke-rs
checkers rust
Last synced: about 1 year ago
JSON representation
Checkers engine written in the rust programming language!
- Host: GitHub
- URL: https://github.com/jusexton/checke-rs
- Owner: jusexton
- License: mit
- Created: 2023-05-24T03:29:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T00:08:33.000Z (over 2 years ago)
- Last Synced: 2025-04-13T13:08:56.030Z (about 1 year ago)
- Topics: checkers, rust
- Language: Rust
- Homepage: https://docs.rs/checke-rs
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# checke-rs

Feature rich and easy to use checkers engine written in the rust programming language.
## Quick Look
```rust
fn main() {
// Initializes a new board with classical checkers starting positions.
let board = Board::default();
// Commence the game by pushing turns.
// Turns can be represented by many different types and can consist of many moves.
board.push_turn("23x18").unwrap();
// Easily revert turns by popping the last turn made.
let popped_state = board.pop_turn();
// The state of the game can easily be iterated via history.
for state in board.history {
// Iterate each state the board was ever in
}
// Convenient methods for retrieving commonly accessed state.
let initial_state = board.initial_state();
let current_state = board.current_state();
// Board state contains the state of the game at a given point in time.
let black_pieces = current_state.black_pieces();
let red_kings = current_state.red_kings();
}
```
## Warning
This library is still under heavy development and breaking changes to the API are almost a certainty!
## License
This project is licensed under the [MIT license].
[mit license]: https://github.com/JSextonn/checke-rs/blob/master/LICENSE