https://github.com/alicerunsonfedora/libtaiji

A Taiji puzzle library written in Lua

https://github.com/alicerunsonfedora/libtaiji

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

lua lua-library puzzle taiji
Last synced: 6 months ago · JSON representation

Repository

A Taiji puzzle library written in Lua

Basic Info
  • Host: GitHub
  • Owner: alicerunsonfedora
  • License: mit
  • Language: Lua
  • Default Branch: main
  • Homepage:
  • Size: 11.7 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
lua lua-library puzzle taiji
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

🏁 libtaiji

A simple Taiji library written in Lua

libtaiji is a small, simple Lua library that lets you parse and check puzzles from the style/mechanics of Taiji by Matthew VanDevander. libtaiji is also the basis for the Playdate game What the Taiji?!.

Getting started

Requirements
- Lua 5.1 or later - Labyrinth

You can either clone this repository with git clone or download the latest tarball package. Copy the libtaiji directory to your library folder in your Lua project.

Note
For those using this library with a Playdate game, you will need to add pd-require and import it into your main.lua file.

Usage documentation

Warning
This documentation is still a work in progress. Most functions should provide documentation comments with type hints compatible with LuaLS.

Parser

To parse a Taiji puzzle code, call the parser function:

```lua local parse = require("libtaiji.parser")

local puzzle = parse("1:Tw0", function (_, _, _, _, _) return {} end) ```

The parser takes two arguments:

  • code (string): The Taiji puzzle code to parse into a puzzle board.
  • generateRenderData (function): The function that will generate render data for the puzzle board. It should return a table of data back, and it provides the following parameters: filled (boolean), state (tile state), symbol (symbol or nil), value (number or nil), and color (color). The table can contain any data and can have any structure suitable for your use case, as this will be attached to each tile on the board.

Checker

To check that a puzzle's board meets all its constraints, call the checker function:

```lua local checker = require("libtaiji.checker")

local ok = checker(puzzle) ```

If the constraints have been satified, the checker will return true.

Note
At this time, the checker does not support checking for color mechanics. This will be added in a later revision behind an optional flag.

License

libtaiji is licensed under the MIT License. You can learn more by reading the LICENSE.txt file.

Owner

  • Name: Marquis Kurt
  • Login: alicerunsonfedora
  • Kind: user
  • Location: Bear, DE

[mar.kɪs kɚrt] He/him. iOS app and game developer.

GitHub Events

Total
  • Push event: 1
  • Create event: 1
Last Year
  • Push event: 1
  • Create event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 6
  • Total Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 6
  • Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Marquis s****e@m****t 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels