hnefatafl 0.0.1-alpha

A crate for building software for the tafl family of board games
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 1 items with examples
  • Size
  • Source code size: 795.24 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.17 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • bunburya/hnefatafl-rs
    1 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bunburya

hnefatafl-rs

hnefatafl is a Rust crate intended to provide functionality for creating software related to the tafl family of board games. It's an early WIP but the idea is that it will eventually provide structs and traits that encapsulate game data and logic, hopefully helping to build games, AIs, etc.

What is implemented

Currently the crate includes a number of structs, traits and enums to describe various aspects of a tafl game:

  • game rules;
  • the board and its current state;
  • current game state;
  • move validation; and
  • determining the outcome of a move.

Many of the most popular rule variants can be constructed, including Copenhagen Hnefatafl, Tablut, Brandubh and Sea Battle.

What is not (yet) implemented

This crate is an early work in progress and I plan to add more features and expand support for the tafl family of games in future.

There are many different variants of tafl, and this crate does not support all possible rules. In particular, the "berserk" rules are not yet implemented, nor are any of the other variants which involve extra pieces beyond soldiers and the king.

Currently only boards up to 11x11 are supported (it is planned to add larger boards soon).