Urgent.News

What's breaking now, across hundreds of outlets.

Tech

🖍️ Darkwaar27 : Pigment — Un casse-tête avec des dés basé sur la rotation et l'algèbre des couleurs

Lire : https://darkwoodcom.itch.io/darkwaar27 Un dé, une règle Pigment est un casse-tête déterministe se jouant sur un plateau de 5×5. Un dé occupe une case du plateau. Une commande le déplace vers une case voisine orthogonale et le fait pivoter de quatre-vingt-dix degrés afin qu’une nouvelle face soit tournée vers le bas. Cette face tournée vers le bas colore la case de destination. Rien d’autre…

Original French Read in English

Pigment is a deterministic puzzle game played on a 5x5 board, featuring a single die occupying one of the board's cells. The die, consisting of six integer values corresponding to each face (D, U, N, S, E, W), rotates upon moving to an adjacent orthogonal cell and determining a new face to face down. This face then colors the destination cell.

No other elements move; the player never selects a color through a menu. Instead, the color displayed is determined by the face the die lands on after rotation. The four directions correspond to a pathfinding calculation and also redefine the available faces in subsequent turns. Five levels created by the author, a shot limit per board, and undo/replay functions govern gameplay.

The die model incorporates six integer values (D, U, N, S, E, W) for each face, with opposite colors fixed (black ↔ white, red ↔ blue, yellow ↔ green). Each level begins with a consistent orientation: the bottom face is black, top face white, north face red, south face blue, east face yellow, and west face green. Subsequent rotations shift these face positions.

A function roll (die: Dictionary, action: String) manipulates these values based on the action direction (east, west, north, south). A match-case function ensures permutations of die states, maintaining opposite color consistency; if D is red, U must remain blue. Colors form an alphabet of seven primary and secondary shades (empty, red, yellow, blue, white, black, orange, violet, green).

Landing on an empty cell writes the color via a deterministic function (existing color, landing face). The die's face-down color is recorded in the cell. Mixing primary colors creates secondary hues; applying the same primary color twice has no effect. White erases all, including sealed cells, while black seals a cell permanently. A primary color applied to a secondary color or sealed cell seals the latter.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Streaks lie. A photo of the minute doesn't.

You have kept a streak before. Somewhere around day nine you started logging the habit after the fact — the tap standing in for the thing itself — and by day twenty the only part still alive was the…

  • One Minute Magic tracks habits in three 60-second tasks
  • Photograph serves as evidence of completed tasks
  • App emphasizes simplicity and transparency

Trusted Timestamps (RFC 3161): How to Anchor a Hash Chain So No One Can Rewrite the Past

A hash chain proves a record was not modified after it was written. It does not prove when it was written, and it does nothing against someone who controls the server and can re-sign the whole chain.

  • Trusted Timestamps (RFC 3161) solve hash chain limitations
  • Time Stamp Authority (TSA) vouches for hash existence at specific time
  • Two anchoring strategies: per-record stamping vs periodic chain-head stamping

More from Sunday 11 October →