Veggerby.Boards
0.1.0-prerelease0158
See the version list below for details.
dotnet add package Veggerby.Boards --version 0.1.0-prerelease0158
NuGet\Install-Package Veggerby.Boards -Version 0.1.0-prerelease0158
<PackageReference Include="Veggerby.Boards" Version="0.1.0-prerelease0158" />
<PackageVersion Include="Veggerby.Boards" Version="0.1.0-prerelease0158" />
<PackageReference Include="Veggerby.Boards" />
paket add Veggerby.Boards --version 0.1.0-prerelease0158
#r "nuget: Veggerby.Boards, 0.1.0-prerelease0158"
#:package Veggerby.Boards@0.1.0-prerelease0158
#addin nuget:?package=Veggerby.Boards&version=0.1.0-prerelease0158&prerelease
#tool nuget:?package=Veggerby.Boards&version=0.1.0-prerelease0158&prerelease
Veggerby.Boards
Immutable, deterministic board game engine primitives: artifacts (Board, Tile, Piece, Player, Dice), immutable GameState
history chain, declarative events, rules, phases, and safe transition execution.
This is the foundational package. Other domain/game modules (Chess, Backgammon) sit on top without extending internal mutable state.
Install
dotnet add package Veggerby.Boards
When To Use
Use this package when you need to:
- Model a turn/phase based board game with deterministic replay
- Express moves as intent (
IGameEvent
) separated from validation and mutation - Maintain a full immutable history for branching / analysis / undo
- Compose rules and phases declaratively
If you only need a ready-made game (e.g., Chess) and won't build custom rules, reference the game module package instead (it transitively references Core).
Quick Start
// Build a custom game (example sketch)
var builder = new GameBuilder("my-game");
// builder.AddBoard(...).AddPlayers(...).AddPieces(...).AddRules(...)
var progress = builder.Compile();
// Issue a move event (pseudo—depends on your defined artifacts)
var piece = progress.Game.GetPiece("white-pawn-2");
var from = progress.Game.GetTile("e2");
var to = progress.Game.GetTile("e4");
var pathVisitor = new ResolveTilePathPatternVisitor(progress.Game.Board, from, to);
var updated = progress.HandleEvent(new MovePieceGameEvent(piece, pathVisitor.ResultPath));
Core Concepts
Concept | Summary |
---|---|
Artifact | Immutable identity created only by GameBuilder |
GameState | Immutable snapshot linked to prior (persistent history) |
GameProgress | Facade carrying Game + current GameState + handling pipeline |
IGameEvent | Declarative intention (e.g., move piece, roll dice) |
Rule | Couples condition evaluation with deterministic mutator |
Phase | Conditional scope limiting which rules apply |
Mutator | Pure function returning a new GameState |
Determinism & Purity
- No randomness except through explicit dice artifacts and their state.
- Same event + same state → same result. Always.
- No hidden global or time-based influences.
Validation Pipeline (High Level)
- Submit
IGameEvent
- Active phase filters applicable rules
- Rule conditions yield: Valid, Invalid, Ignore, NotApplicable
- First Valid rule's mutator executes producing new
GameState
- New
GameProgress
returned (state chained)
Extending
Typical extension points:
- New
IGameEvent
+ corresponding mutator & rule - New pattern visitor for movement resolution
- New composite condition types
Keep extensions explicit and side-effect free.
Versioning
Semantic versioning aligned with repository releases. Breaking API changes bump MAJOR.
Roadmap (Selected)
- Decision plan executor (optimized rule dispatch)
- Deterministic timeline hashing
- Movement pattern compilation (DFA)
- Optional bitboard acceleration (game-specific)
Contributing
Issues & PRs: https://github.com/veggerby/Veggerby.Boards
Follow repository contribution guidelines and style rules.
License
MIT License. See repository root LICENSE
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Veggerby.Algorithm (>= 1.0.0)
-
net9.0
- Veggerby.Algorithm (>= 1.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Veggerby.Boards:
Package | Downloads |
---|---|
Veggerby.Boards.Chess
Chess implementation components for Veggerby.Boards built atop the core engine. |
|
Veggerby.Boards.Backgammon
Backgammon implementation components for Veggerby.Boards built atop the core engine. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.1.0-prerelease0161 | 51 | 9/26/2025 |
0.1.0-prerelease0160 | 49 | 9/26/2025 |
0.1.0-prerelease0159 | 55 | 9/26/2025 |
0.1.0-prerelease0158 | 62 | 9/26/2025 |
0.1.0-prerelease0157 | 149 | 9/21/2025 |
0.1.0-prerelease0156 | 150 | 9/21/2025 |