0. Install git-fat https://github.com/jedbrown/git-fat
1. git fat init && git fat pull
- 2. Execute db/create.sql script (SQLite) to fill db/vchess.sqlite database
- 3. Rename public/javascripts/socket\_url.js.dist into socket\_url.js
- and adjust its content.
+ 2. Execute db/\*.sql scripts to create and fill db/vchess.sqlite
+ 3. Rename and edit public/javascripts/socket\_url.js.dist into socket\_url.js
4. npm i && npm start
--- database should be in this folder, and named 'vchess.sqlite'
+-- Database should be in this folder, and named 'vchess.sqlite'
create table Variants (
name varchar primary key,
description text
);
-insert into Variants values
- ('Checkered', 'Shared pieces'),
- ('Zen', 'Reverse captures'),
- ('Atomic', 'Explosive captures'),
- ('Chess960', 'Standard rules'),
- ('Antiking', 'Keep antiking in check'),
- ('Magnetic', 'Laws of attraction'),
- ('Alice', 'Both sides of the mirror'),
- ('Grand', 'Big board'),
- ('Wildebeest', 'Balanced sliders & leapers'),
- ('Loser', 'Lose all pieces'),
- ('Crazyhouse', 'Captures reborn'),
- ('Switching', 'Exchange pieces positions'),
- ('Extinction', 'Capture all of a kind'),
- ('Marseille', 'Move twice'),
- ('Upsidedown', 'Walking on the hands'),
- ('Dark', 'In the shadow'),
- ('Berolina', 'Pawns move diagonally'),
- ('Ultima', 'Exotic captures');
create table Problems (
num integer primary key,
solution text,
foreign key (variant) references Variants(name)
);
---PRAGMA foreign_keys = ON;
+
+PRAGMA foreign_keys = ON;
--- /dev/null
+-- Re-run this script after variants are added
+
+insert or ignore into Variants values
+ ('Alice', 'Both sides of the mirror'),
+ ('Antiking', 'Keep antiking in check'),
+ ('Atomic', 'Explosive captures'),
+ ('Baroque', 'Exotic captures'),
+ ('Berolina', 'Pawns move diagonally'),
+ ('Checkered', 'Shared pieces'),
+ ('Chess960', 'Standard rules'),
+ ('Crazyhouse', 'Captures reborn'),
+ ('Dark', 'In the shadow'),
+ ('Extinction', 'Capture all of a kind'),
+ ('Grand', 'Big board'),
+ ('Losers', 'Lose all pieces'),
+ ('Magnetic', 'Laws of attraction'),
+ ('Marseille', 'Move twice'),
+ ('Switching', 'Exchange pieces positions'),
+ ('Upsidedown', 'Walking on the hands'),
+ ('Wildebeest', 'Balanced sliders & leapers'),
+ ('Zen', 'Reverse captures');