GithubHelp home page GithubHelp logo

monikae / dominosasolver Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 53 KB

Solver for Dominosa (or "Solitaire Dominoes") e.g. https://www.puzzles-mobile.com/dominosa/random/3x3

Java 16.86% JavaScript 27.91% TypeScript 27.12% HTML 28.10%

dominosasolver's Introduction

DominosaSolver

This is a JavaScript implementation of the Dominosa Solver, originally written in Java by @Monikae.

Usage

To get a solution for a particular board:

dominosa_solver.DominosaSolver.getSolution(rows, columns, highestNumber, numbersOnBoard[][])

Prints the solution in the browser's debug console and returns the solution positions as an array (null if board is unsolveable).

dominosa_solver namespace also gives the user access to another other object in the library.

Quick Start

Simply download solver.html, load it in the browser and enter the command above in the browser's debug console.

Library

DominosaSolver.js and DominosaSolver.ts are compiled, standalone libraries that can be used in any JS or TS project.

Modifying Source

This library was created with the Jsweet transpiler. To modify the library, it's recommended to clone the repository, edit the source files and recompile.

To recompile, you must first have Git, Maven and NodeJS installed and available in your path. From there, execute the command mvn generate-sources in the repository's root directory. This will re-transpile the library and place it in the target/js/build.js directory.

For compatability purposes, the library itself avoids using many Java utilities in favor of replacing them with JavaScript functions provided by the JSweet API. Please see the Jsweet Language Specification for more information.

dominosasolver's People

Contributors

assemblaj avatar monikae avatar

Watchers

 avatar  avatar

Forkers

assemblaj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.