Skip to content

Generator and interactive app for trees logic puzzles (see README)

Notifications You must be signed in to change notification settings

Omnikar/trees-puzzles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generator for trees logic puzzles.

Requires Uiua v0.10.

Below is an example puzzle.

An 8x8 puzzle

The rules are as follows:

  • Each square either contains a "tree" or does not contain a tree (there is no significance to the object in question being a "tree," it is really just an arbitrary object occupying one cell).
  • Every row, every column, and every colored region contains exactly one tree.
  • Two trees cannot be adjacent to each other, even diagonally.

Since this specific puzzle is 8x8, there are a total of 8 trees; solve the puzzle by finding them.

Example usage

Generate an 8x8 puzzle and play it with the app.

uiua gen.ua 8
uiua app.ua

Generate

Generates an NxN puzzle and writes it to file.

  • N defaults to 5
  • file defaults to out.csv
uiua gen.ua [N] [file]

Play using interactive app

Requires raylib pointed to by RAYLIB_PATH. Starts the interactive app with the puzzle in file.

  • file defaults to out.csv
uiua app.ua [file]

In the app, left/right click on squares to cycle between eliminated (-) and tree (T). Press space to reroll the colorscheme.

Generate an image

If img is provided, outputs a png of the puzzle in puz to the filename img.

Otherwise, outputs an image of the puzzle in puz to the terminal.

  • puz defaults to out.csv
uiua img.ua [puz] [img]

About

Generator and interactive app for trees logic puzzles (see README)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published