All Projects → nozaq → shogi-rs

nozaq / shogi-rs

Licence: MIT license
A Bitboard-based shogi library in Rust. Board representation, move generation/validation and time control utilities.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to shogi-rs

shogi-player
将棋の棋譜を再生したり盤面を編集したりします
Stars: ✭ 42 (+7.69%)
Mutual labels:  usi, shogi, sfen
shogi-pieces
Shogi (Japanese Chess) pieces and boards
Stars: ✭ 25 (-35.9%)
Mutual labels:  board-game, shogi
termscp
🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3
Stars: ✭ 707 (+1712.82%)
Mutual labels:  rust-crate
terminally bored terminal board games
board games for your terminal!
Stars: ✭ 53 (+35.9%)
Mutual labels:  board-game
efi
Ergonomic Rust framework for writing UEFI applications.
Stars: ✭ 44 (+12.82%)
Mutual labels:  rust-crate
rake-rs
Multilingual implementation of RAKE algorithm for Rust
Stars: ✭ 30 (-23.08%)
Mutual labels:  rust-crate
ShogiGUI-piece-sets
All types of piece sets included plus boards and stands.
Stars: ✭ 15 (-61.54%)
Mutual labels:  shogi
Alphazero gomoku
An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
Stars: ✭ 2,570 (+6489.74%)
Mutual labels:  board-game
boardgame-socketplayer
A generic board game socket client
Stars: ✭ 21 (-46.15%)
Mutual labels:  board-game
gobject-example-rs
Example for exporting a GObject/C API from Rust
Stars: ✭ 31 (-20.51%)
Mutual labels:  rust-crate
piecepackr
Board Game Graphics in R
Stars: ✭ 44 (+12.82%)
Mutual labels:  board-game
deck.zone
A board game creation tool.
Stars: ✭ 19 (-51.28%)
Mutual labels:  board-game
kalker
Kalker/kalk is a calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
Stars: ✭ 1,237 (+3071.79%)
Mutual labels:  rust-crate
AccessBattle
Free non-commercial implementation of the game "Rai-Net Access Battlers"
Stars: ✭ 15 (-61.54%)
Mutual labels:  board-game
cactusref
🌵 Cycle-Aware Reference Counting in Rust
Stars: ✭ 129 (+230.77%)
Mutual labels:  rust-crate
immutable-gametree
An immutable game tree data type.
Stars: ✭ 18 (-53.85%)
Mutual labels:  board-game
rsfbclient
Rust Firebird Client
Stars: ✭ 64 (+64.1%)
Mutual labels:  rust-crate
craft
The universal Sentry release CLI 🚀
Stars: ✭ 117 (+200%)
Mutual labels:  rust-crate
deerportal
Full of the diamonds 💎 board game driven by a 🦌 Deer 🦌 god and classical elements 🔥 💦 💨 🌍
Stars: ✭ 31 (-20.51%)
Mutual labels:  board-game
SpaceAlertMissionGenerator
Mission Generator For Space Alert Board Game On Android
Stars: ✭ 15 (-61.54%)
Mutual labels:  board-game

shogi-rs

Github Actions Coverage Status crates.io docs.rs

A Bitboard-based shogi library in Rust. Board representation, move generation/validation and time control utilities.

Documentation

Usage

A library for implementing Shogi application.

shogi provides a various types and implementations for representing concepts and rules in Shogi. Most types can be created programatically while they can also be deserialized from / serialized to SFEN format. See USIプロトコルとは (What is the USI protocol?) for more detail about UCI protocol specification and SFEN format.

Examples

use shogi::{Move, Position};
use shogi::bitboard::Factory as BBFactory;
use shogi::square::consts::*;

BBFactory::init();
let mut pos = Position::new();

// Position can be set from the SFEN formatted string.
pos.set_sfen("lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1").unwrap();

// You can programatically create a Move instance.
let m = Move::Normal{from: SQ_7G, to: SQ_7F, promote: false};
pos.make_move(m).unwrap();

// Move can be created from the SFEN formatted string as well.
let m = Move::from_sfen("7c7d").unwrap();
pos.make_move(m).unwrap();

// Position can be converted back to the SFEN formatted string.
assert_eq!("lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL b - 1 moves 7g7f 7c7d", pos.to_sfen());

Related crates

  • csa-rs: A Shogi game serialization/deserialization library in CSA format.
  • usi-rs: A library to handle type-safe communication with USI-compatible shogi engines.

License

shogi-rs is licensed under the MIT license. Please read the LICENSE file in this repository for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].