Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
be18119
First commit
ReverM May 20, 2025
c20ba32
In case something goes wrong things are pushed
ReverM Jun 4, 2025
59226d1
And here goes the license
ReverM Jun 4, 2025
3ae7853
Fix typo in license
ReverM Jun 5, 2025
a7b7b56
More genre support
ReverM Jun 6, 2025
bf60e71
Rest of the genres
ReverM Jun 7, 2025
5c9aafc
Added fourcells and tetrominous (solver)
ReverM Jun 23, 2025
291ea5f
added croad
ReverM Aug 17, 2025
aa062c8
added hitori
ReverM Aug 20, 2025
f402d73
added chocona
ReverM Aug 20, 2025
e3b2e89
Added CTS, Nonogram (semiexp) and Tasquare(rever)
ReverM Sep 1, 2025
42bd6e3
Added a lot of solvers
ReverM Oct 4, 2025
ec24664
Added shugaku, alongside multithreading
ReverM Nov 2, 2025
1adbb7f
Now its back (added back thread):
ReverM Nov 24, 2025
30f3ca4
Added a lot of new genres
ReverM Nov 24, 2025
39a996b
Formatting!
ReverM Dec 17, 2025
e093c6b
fixed formatting
ReverM Dec 17, 2025
404e484
for conflict
ReverM Dec 17, 2025
9dcc782
for conflict (for real this time)
ReverM Dec 17, 2025
6e3b329
will revert in a bit
ReverM Dec 17, 2025
dff3e56
why are you like this
ReverM Dec 17, 2025
ebcf764
now will you be happy?
ReverM Dec 17, 2025
326538a
Merge branch 'robx:main' into forwebsite
ReverM Dec 17, 2025
755194b
New genres!
ReverM Dec 17, 2025
6423132
Added city space
ReverM Dec 18, 2025
0a8db3e
Fixed bug with kouchoku
ReverM Dec 18, 2025
ea7b074
Added various solvers
ReverM Feb 14, 2026
b04be06
Added battleship
ReverM Feb 15, 2026
6bfdd41
Graphical bug with battleship
ReverM Feb 15, 2026
fc5f902
Added autosolve calls to make the experience better
ReverM Feb 16, 2026
e016b6c
oop
ReverM Feb 16, 2026
6488c0a
Removed autosolve call that may be causing issues on mobile
ReverM Feb 16, 2026
a5279ca
Fixed issue with slither and removed bad files
ReverM Feb 17, 2026
fb7cfc8
Added shugaku back
ReverM Feb 17, 2026
c23413e
Changed where automatic solve is called
ReverM Feb 17, 2026
7e7925a
Added solver for minesweeper
ReverM Feb 17, 2026
c0f509c
Changed battleship to account for new backend and added tents
ReverM Feb 20, 2026
af24a2a
Added solver for army ants
ReverM Mar 2, 2026
6f93852
Renamed to pzp-rever-t and added solvers
ReverM Mar 4, 2026
f2b4a0f
Added solver for skyscrapers
ReverM Mar 6, 2026
0779653
Fixed small issue with rule pages
ReverM Mar 9, 2026
76bb250
Added solver for light and shadow and changed graphics for shugaku
ReverM Mar 17, 2026
3394192
Fix L&S, restore shugaku, added iso, tweaked doubleback, add slant
ReverM Apr 9, 2026
9486a4c
The beds were backward
ReverM Apr 9, 2026
b72a866
Added new solver and tweaked for ABC
ReverM Apr 21, 2026
cd32e4d
Merge remote-tracking branch 'upstream/main' into forwebsite
ReverM Apr 21, 2026
da2375d
Added 3 Solver and removed debug line
ReverM Apr 22, 2026
70c787f
partial step
ReverM Jul 3, 2026
57ebcf3
Merge branch 'main' of https://github.com/robx/pzprjs into forwebsite
ReverM Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/lib/*.js
src/common/*.js
src-ui/js/common/*.js
src/solver/*.js
50 changes: 45 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ module.exports = function(grunt){
files : [
{ expand: true, cwd: 'src-ui/css', src: ['*.css'], dest: 'dist/css' },
{ expand: true, cwd: 'src-ui/img', src: ['*.png'], dest: 'dist/img' },
{ expand: true, cwd: 'src-ui', src: ['*'], dest: 'dist' }
{ expand: true, cwd: 'src-ui', src: ['*'], dest: 'dist' },
{ expand: true, cwd: 'src-ui/js', src: ['solver.js'], dest: 'dist/js' },
{ expand: true, cwd: 'src-ui/js', src: ['solverNoWorker.js'], dest: 'dist/js' }
]
}
},
Expand All @@ -76,7 +78,23 @@ module.exports = function(grunt){
files: [
{ src: require('./src/pzpr.js').files, dest: 'dist/js/pzpr.concat.js' }
]
},
},
solver: {
options: {
sourceMap: !PRODUCTION
},
files: [
{ src: require('./src/solver.js').files, dest: 'dist/js/solver.concat.js' }
]
},
solverNoWorker: {
options: {
sourceMap: !PRODUCTION
},
files: [
{ src: require('./src/solverNoThread.js').files, dest: 'dist/js/solverNoWorker.concat.js' }
]
},
ui: {
options:{
sourceMap: !PRODUCTION
Expand Down Expand Up @@ -117,7 +135,27 @@ module.exports = function(grunt){
files: [
{ src: 'dist/js/pzpr.concat.js', dest: 'dist/js/pzpr.js'}
]
},
},
solver: {
options: (PRODUCTION ? {} : {
sourceMap: 'dist/js/solver.js.map',
sourceMapIn: 'dist/js/solver.concat.js.map',
sourceMapIncludeSources: true
}),
files: [
{ src: 'dist/js/solver.concat.js', dest: 'dist/js/solver.js' }
]
},
solverNoWorker: {
options: (PRODUCTION ? {} : {
sourceMap: 'dist/js/solverNoWorker.js.map',
sourceMapIn: 'dist/js/solverNoWorker.concat.js.map',
sourceMapIncludeSources: true
}),
files: [
{ src: 'dist/js/solverNoWorker.concat.js', dest: 'dist/js/solverNoWorker.js' }
]
},
variety:{
options: (PRODUCTION ? {} : {
sourceMap : function(filename){ return filename+'.map';}
Expand Down Expand Up @@ -150,8 +188,10 @@ module.exports = function(grunt){

grunt.registerTask('default', ['build']);
grunt.registerTask('release', ['build']);
grunt.registerTask('build', ['build:pzpr', 'build:variety', 'build:samples', 'build:ui']);
grunt.registerTask('build:pzpr', ['concat:pzpr', 'uglify:pzpr']);
grunt.registerTask('build', ['build:pzpr', 'build:solver', 'build:solverNoWorker', 'build:variety', 'build:samples', 'build:ui']);
grunt.registerTask('build:pzpr', ['concat:pzpr', 'uglify:pzpr']);
grunt.registerTask('build:solver', ['concat:solver', 'uglify:solver']);
grunt.registerTask('build:solverNoWorker', ['concat:solverNoWorker', 'uglify:solverNoWorker']);
grunt.registerTask('build:ui', ['copy:ui', 'concat:ui', 'uglify:ui']);
grunt.registerTask('build:variety',['uglify:variety']);
grunt.registerTask('build:samples',['concat:samples', 'uglify:samples']);
Expand Down
58 changes: 58 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ The MIT License

Copyright (c) 2011, 2014 Kobayashi, Daisuke (sabo2)
Copyright (c) 2019 Vollmert, Robert and contibutors
Copyright (c) 2021 semiexp
Copyright (c) 2025 Rever

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,3 +22,59 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


=============================================================================

Currently, cspuz_core uses Glucose SAT solver as a backend.
When compiled with it, the following licence for Glucose applies.

=============================================================================

Glucose -- Copyright (c) 2009-2017, Gilles Audemard, Laurent Simon
CRIL - Univ. Artois, France
LRI - Univ. Paris Sud, France (2009-2013)
Labri - Univ. Bordeaux, France
2021- , semiexp

Syrup (Glucose Parallel) -- Copyright (c) 2013-2014, Gilles Audemard, Laurent Simon
CRIL - Univ. Artois, France
Labri - Univ. Bordeaux, France

Glucose sources are based on MiniSat (see below MiniSat copyrights). Permissions and copyrights of
Glucose (sources until 2013, Glucose 3.0, single core) are exactly the same as Minisat on which it
is based on. (see below).

Glucose-Syrup sources are based on another copyright. Permissions and copyrights for the parallel
version of Glucose-Syrup (the "Software") are granted, free of charge, to deal with the Software
without restriction, including the rights to use, copy, modify, merge, publish, distribute,
sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

- The above and below copyrights notices and this permission notice shall be included in all
copies or substantial portions of the Software;
- The parallel version of Glucose (all files modified since Glucose 3.0 releases, 2013) cannot
be used in any competitive event (sat competitions/evaluations) without the express permission of
the authors (Gilles Audemard / Laurent Simon). This is also the case for any competitive event
using Glucose Parallel as an embedded SAT engine (single core or not).


--------------- Original Minisat Copyrights

Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
Copyright (c) 2007-2010, Niklas Sorensson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Empty file modified git-hash.sh
100755 → 100644
Empty file.
113 changes: 113 additions & 0 deletions nodesource_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#!/bin/bash

# Logger Function
log() {
local message="$1"
local type="$2"
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
local color
local endcolor="\033[0m"

case "$type" in
"info") color="\033[38;5;79m" ;;
"success") color="\033[1;32m" ;;
"error") color="\033[1;31m" ;;
*) color="\033[1;34m" ;;
esac

echo -e "${color}${timestamp} - ${message}${endcolor}"
}

# Error handler function
handle_error() {
local exit_code=$1
local error_message="$2"
log "Error: $error_message (Exit Code: $exit_code)" "error"
exit $exit_code
}

# Function to check for command availability
command_exists() {
command -v "$1" &> /dev/null
}

check_os() {
if ! [ -f "/etc/debian_version" ]; then
echo "Error: This script is only supported on Debian-based systems."
exit 1
fi
}

# Function to Install the script pre-requisites
install_pre_reqs() {
log "Installing pre-requisites" "info"

# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
fi

# Run 'apt-get install'
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
handle_error "$?" "Failed to install packages"
fi

if ! mkdir -p /usr/share/keyrings; then
handle_error "$?" "Makes sure the path /usr/share/keyrings exist or run ' mkdir -p /usr/share/keyrings' with sudo"
fi

rm -f /usr/share/keyrings/nodesource.gpg || true
rm -f /etc/apt/sources.list.d/nodesource.list || true

# Run 'curl' and 'gpg' to download and import the NodeSource signing key
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to download and import the NodeSource signing key"
fi

# Explicitly set the permissions to ensure the file is readable by all
if ! chmod 644 /usr/share/keyrings/nodesource.gpg; then
handle_error "$?" "Failed to set correct permissions on /usr/share/keyrings/nodesource.gpg"
fi
}

# Function to configure the Repo
configure_repo() {
local node_version=$1

arch=$(dpkg --print-architecture)
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
fi

echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null

# N|solid Config
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null

# Nodejs Config
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null

# Run 'apt-get update'
if ! apt-get update -y; then
handle_error "$?" "Failed to run 'apt-get update'"
else
log "Repository configured successfully."
log "To install Node.js, run: apt-get install nodejs -y" "info"
log "You can use N|solid Runtime as a node.js alternative" "info"
log "To install N|solid Runtime, run: apt-get install nsolid -y \n" "success"
fi
}

# Define Node.js version
NODE_VERSION="23.x"

# Check OS
check_os

# Main execution
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
Loading
Loading