Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivamka1/chess-tour-playground
https://github.com/shivamka1/chess-tour-playground
Last synced: about 8 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/shivamka1/chess-tour-playground
- Owner: shivamka1
- Created: 2021-07-15T08:14:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-15T11:57:51.000Z (over 3 years ago)
- Last Synced: 2025-01-13T06:20:54.050Z (6 days ago)
- Language: Scala
- Size: 186 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chess-tour-playground
This is a scalajs based project that makes use of a shared library built in Scala which implements chess tour algorithm. This shared library is cross-compiled to both Scala and javascript so as to facilitate usage of the library in a front-end app.## Solution
The solution is based on Warnsdorff Heuristic Algorithm implemented as tail recursive back-tracking. See a sample dry-run of a simplified problem statement [here](https://docs.google.com/spreadsheets/d/13-e_vpze8RIx9d_2ZaKqY4_NoKBgP1p4cKifGu-lvhg/edit?usp=sharing).## Test
The tests are written as property based test cases.
```
$ sbt test
```## Build
Build chess tour shared library as a distributable optimized version javascript file like so:
```
$ sbt fullOptJS
```## Deploy
The optimized file is built under `js/target/scala-2.12` as `chess-tour-playground-opt.js`. This file needs to be moved to the `/public` directory.
```
$ mv js/target/scala-2.12/chess-tour-playground-opt.js public
```## Usage
Open `index.html` in a browser of your choice to launch **Chess Tour Playground**. You can also access already deployed version [here](https://iamsmkr.github.io/chess-tour-playground/).
![Chess Tour Demo](https://github.com/iamsmkr/chess-tour-playground/blob/main/public/chess-tour.gif)