Open T0nyX1ang opened 5 months ago
Decided to implement a converter from pzprv3 in the future.
There is a method to use a "bare" pzpr canvas:
<!DOCTYPE html>
<html>
<head>
<script src='https://puzz.link/js/pzpr.js'></script>
<script>
var puzzle;
pzpr.on('load', function () {
puzzle = new pzpr.Puzzle(document.getElementById('puzzlecanvas'), { type: 'editor' });
puzzle.open('nurikabe/5/5');
pzpr.connectKeyEvents(puzzle);
});
</script>
</head>
<body>
<div id="puzzlecanvas" style="width:200px;height:200px;"></div>
<input type="button" value="Check" onclick="alert(puzzle.check(true).text);"></input>
<input type="button" value="Clear" onclick="puzzle.clear();"></input>
</body>
</html>
Since many puzzles can be played on, it is natural to use the globally recognized pzprv3 format. In this way, noqx will become a solving backend eventually, and the frontend will be implemented simply by adding a html
object
tag:A sample frontend is as follows (with problem loading):
I plan to implement this after 90% or more solvers in noqx are solved in Clingo.