| Crates.io | simple_chess |
| lib.rs | simple_chess |
| version | 1.0.6 |
| created_at | 2024-12-08 18:37:49.503684+00 |
| updated_at | 2025-04-14 16:53:18.623114+00 |
| description | A simple chess game implimentation |
| homepage | |
| repository | https://github.com/imcnaugh/simple_chess/tree/main/simple_chess |
| max_upload_size | |
| id | 1476539 |
| size | 149,802 |
This package provides a comprehensive implementation of the game of chess. It includes all the necessary components to simulate a chess game, and offers functionalities for game setup, move validation, and game state evaluation. This package is suitable for both hobbyists and developers looking to integrate a chess engine into their applications.
Below is a basic usage example showcasing how to create a new chess game and make a move:
use chess::chess_game_state_analyzer::GameState;
use chess::ChessGame;
fn main() {
let mut game = ChessGame::new();
let mut state = game.get_game_state();
match state {
GameState::InProgress { legal_moves, turn } => {
println!("play on, Its {:?}'s turn.", turn);
state = game.make_move(legal_moves[0])
},
_ => ()
};
println!("{}", game.get_board());
}
This project is licensed under the MIT License. See the LICENSE file for more details.