https://github.com/Flixbox/flixbox-nodebot
The lightbot solver is built on top of Vite 4.x and TypeScript. It generates a hybrid package - both support for CommonJS and ESM modules.
- Most of the parser is from Bing AI.
- The individual levels have been downloaded from https://github.com/haan/Lightbot/blob/master/resources/maps/maps.txt
- Only a few levels have been implemented. The startig y-coordinates were garbled in the original data, and I only had the chance to fix a few of them.
- There is a limited amount of tests and no negative test yet. Feel free to add more by adding the text files in ./test and adding them to test/commands.ts
- I did not test if nested loops work. I wonder if Bing AI was smart enough to implement that. ¯\(ツ)/¯
Install via npm i
, then simply run npm run test
to run the tests.
The repo contains the following scripts:
build
- generates the following bundles: CommonJS (.cjs
) ESM (.mjs
) and IIFE (.iife.js
). The name of bundle is automatically taken frompackage.json
name propertytest
- starts vitest and runs all teststest:coverage
- starts vitest and run all tests with code coverage reportlint:scripts
- lint.ts
files with eslintlint:styles
- lint.css
and.scss
files with stylelintformat:scripts
- format.ts
,.html
and.json
files with prettierformat:styles
- format.cs
and.scss
files with stylelintformat
- format all with prettier and stylelintprepare
- script for setting up husky pre-commit hookuninstall-husky
- script for removing husky from repository