arimaa_engine_step

Crates.ioarimaa_engine_step
lib.rsarimaa_engine_step
version1.0.1
sourcesrc
created_at2022-06-19 08:34:38.812205
updated_at2022-06-19 16:54:42.750498
descriptionA step based engine for the board game Arimaa.
homepage
repositoryhttps://github.com/JamesMHarmon/arimaa-engine-step
max_upload_size
id608862
size285,746
(JamesMHarmon)

documentation

README

Step based Arimaa Engine

docs.rs Crates.io MIT licensed

Overview

A game engine for the board game Arimaa. This library provides the functionalities:

  • Generate a set of valid steps from any state.
  • Generate a set of valid moves from any state.
  • Supports Zobrist hashing for transpositions.
  • Parsers for boards and actions.

Documentation

Example

Parse a game state and take an action and generate a set of valid actions from that state.

use arimaa_engine_step::{action, board};

let game_state = board!(
    "2g
     +-----------------+
    8| h c d m e d c h |
    7| r r r r r r r r |
    6|     x     x     |
    5|                 |
    4|                 |
    3|     x     x     |
    2| R R R R R R R R |
    1| H C D M E D C H |
     +-----------------+
       a b c d e f g h"
);

let action = action!(d2n);
let game_state = game_state.take_action(&action);

println!("{:?}", game_state.valid_actions());

Additional Examples

License

This project is licensed under the MIT license.

Commit count: 13

cargo fmt