Heliograph.Engine
0.1.0
dotnet add package Heliograph.Engine --version 0.1.0
NuGet\Install-Package Heliograph.Engine -Version 0.1.0
<PackageReference Include="Heliograph.Engine" Version="0.1.0" />
<PackageVersion Include="Heliograph.Engine" Version="0.1.0" />
<PackageReference Include="Heliograph.Engine" />
paket add Heliograph.Engine --version 0.1.0
#r "nuget: Heliograph.Engine, 0.1.0"
#:package Heliograph.Engine@0.1.0
#addin nuget:?package=Heliograph.Engine&version=0.1.0
#tool nuget:?package=Heliograph.Engine&version=0.1.0
Heliograph.Engine
The rules engine for Heliograph, a board game of mirrors and light. It covers move legality, the laser trace, win detection, the named board layouts and the rule variants. It is the same engine the Heliograph server uses to referee games.
The engine is pure and deterministic. It does no I/O, uses no clock and no randomness, and depends on
nothing beyond the .NET base class library. Every method takes an immutable Board and returns a new one.
Install
dotnet add package Heliograph.Engine
Targets net10.0.
A turn
A turn is one move, then the mover's laser fires. A player whose Keep is destroyed loses.
using Heliograph.Engine;
using Heliograph.Engine.Enums;
var rules = RuleSets.FixedSun; // or RuleSets.TurningSun
var board = BoardLayouts.For("Dawn", rules).Build(); // also "Zenith", "Dusk"
var toMove = Player.P1;
var moves = GameEngine.LegalMoves(board, toMove, rules);
board = GameEngine.ApplyMove(board, moves[0]);
var (afterLaser, outcome) = GameEngine.FireLaser(board, toMove);
var status = GameEngine.CheckWin(afterLaser); // InProgress, P1Win or P2Win
GameEngine.ValidateMove explains why a single move is illegal. Pass the same RuleSet to
LegalMoves and ValidateMove that you used to pick the layout: stacking moves exist only under
FixedSun.
Versioning
The package version is set from the engine-v* tag it was published from. Bots and tools that record
games should store the engine version with each game, because a rule change makes results from
different versions incomparable.
Licence
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 140 | 11/3/2026 |