Skip to content

Commit

Permalink
Exolve v1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
viresh-ratnakar authored Apr 11, 2021
1 parent 253d1e2 commit b9d86e0
Show file tree
Hide file tree
Showing 54 changed files with 149 additions and 137 deletions.
2 changes: 1 addition & 1 deletion exolve-from-ipuz.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
The latest code and documentation for Exolve can be found at:
https://github.com/viresh-ratnakar/exolve
Version: Exolve v1.12 April 8 2021
Version: Exolve v1.13 April 10 2021
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion exolve-from-puz.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SOFTWARE.
The latest code and documentation for Exolve can be found at:
https://github.com/viresh-ratnakar/exolve
Version: Exolve v1.12 April 8 2021
Version: Exolve v1.13 April 10 2021
*/

function exolveFromPuzNextNull(buffer, offset) {
Expand Down
6 changes: 3 additions & 3 deletions exolve-m-simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
See the full Exolve license notice in exolve-m.js.
Version: Exolve v1.12 April 8 2021
Version: Exolve v1.13 April 10 2021
-->

<link rel="stylesheet" type="text/css" href="https://viresh-ratnakar.github.io/exolve-m.css?v1.12"/>
<script src="https://viresh-ratnakar.github.io/exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="https://viresh-ratnakar.github.io/exolve-m.css?v1.13"/>
<script src="https://viresh-ratnakar.github.io/exolve-m.js?v1.13"></script>

<title>Exolve</title>

Expand Down
2 changes: 1 addition & 1 deletion exolve-m.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Copyright (c) 2019 Viresh Ratnakar
See the full license notice in exolve-m.js.
Version: Exolve v1.12 April 8 2021
Version: Exolve v1.13 April 10 2021
*/

@media (max-width: 500px) {
Expand Down
6 changes: 3 additions & 3 deletions exolve-m.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
See the full Exolve license notice in exolve-m.js.
Version: Exolve v1.12 April 8 2021
Version: Exolve v1.13 April 10 2021
-->
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>

<title>Exolve (replace with puzzle title)</title>

Expand Down
38 changes: 22 additions & 16 deletions exolve-m.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function Exolve(puzzleSpec,
visTop=0,
maxDim=0,
saveState=true) {
this.VERSION = 'Exolve v1.12 April 8 2021'
this.VERSION = 'Exolve v1.13 April 10 2021'

this.puzzleText = puzzleSpec
this.containerId = containerId
Expand All @@ -93,6 +93,20 @@ function Exolve(puzzleSpec,
this.credits = []
this.questionTexts = []

this.NINA_COLORS = [
'blue',
'green',
'aqua',
'fuchsia',
'yellow',
'crimson',
'limegreen',
'royalblue',
'mediumturquoise',
'mediumorchid',
'goldenrod',
'red',
];
// Each nina will be object with props: colour and list (an array containing
// location [i,j] pairs and/or span class names).
this.ninas = []
Expand Down Expand Up @@ -908,6 +922,8 @@ Exolve.prototype.answerListener = function(answer, forceUpper) {
// last ')'.
Exolve.prototype.redisplayQuestions = function() {
this.questions.innerHTML = '';
const savedAnsList = this.answersList.slice();
this.answersList = [];
for (let s of this.questionTexts) {
let enumParse = this.parseEnum(s)
let inputLen = enumParse.placeholder.length
Expand Down Expand Up @@ -977,6 +993,9 @@ Exolve.prototype.redisplayQuestions = function() {
answer.addEventListener(
'input', this.answerListener.bind(this, answer, forceUpper));
}
for (const a of savedAnsList) {
if (!a.isq) this.answersList.push(a);
}
}

Exolve.prototype.parseSubmit = function(s) {
Expand Down Expand Up @@ -4918,19 +4937,6 @@ Exolve.prototype.makeColouredRect = function(row, col, colour) {
}

Exolve.prototype.redisplayNinas = function() {
const NINA_COLORS = [
'rgb(0,0,220)',
'rgb(0,220,0)',
'rgb(0,220,220)',
'rgb(220,0,220)',
'rgb(220,220,0)',
'rgb(220,50,50)',
'rgb(50,220,50)',
'rgb(50,50,220)',
'rgb(50,200,200)',
'rgb(200,50,200)',
'rgb(200,200,50)',
];
this.ninaGroup.innerHTML = '';
this.ninaClassElements = [];
let ninaColorIndex = 0;
Expand All @@ -4946,8 +4952,8 @@ Exolve.prototype.redisplayNinas = function() {
}
let colour = nina.colour;
if (!colour) {
colour = NINA_COLORS[ninaColorIndex];
ninaColorIndex = (ninaColorIndex + 1) % NINA_COLORS.length
colour = this.NINA_COLORS[ninaColorIndex];
ninaColorIndex = (ninaColorIndex + 1) % this.NINA_COLORS.length
}
for (let cellOrClass of nina2) {
if (!Array.isArray(cellOrClass)) {
Expand Down
8 changes: 4 additions & 4 deletions exolve-player.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<script src="exolve-from-ipuz.js?v1.12"></script>
<script src="exolve-from-puz.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<script src="exolve-from-ipuz.js?v1.13"></script>
<script src="exolve-from-puz.js?v1.13"></script>

<style>
#exolve-player {
Expand Down
38 changes: 22 additions & 16 deletions exolve.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
visTop=0,
maxDim=0,
saveState=true) {
this.VERSION = 'Exolve v1.12 April 8 2021'
this.VERSION = 'Exolve v1.13 April 10 2021'

this.puzzleText = puzzleSpec
this.containerId = containerId
Expand All @@ -126,6 +126,20 @@
this.credits = []
this.questionTexts = []

this.NINA_COLORS = [
'blue',
'green',
'aqua',
'fuchsia',
'yellow',
'crimson',
'limegreen',
'royalblue',
'mediumturquoise',
'mediumorchid',
'goldenrod',
'red',
];
// Each nina will be object with props: colour and list (an array containing
// location [i,j] pairs and/or span class names).
this.ninas = []
Expand Down Expand Up @@ -941,6 +955,8 @@ <h2 id="${this.prefix}-title" class="xlv-title"></h2>
// last ')'.
Exolve.prototype.redisplayQuestions = function() {
this.questions.innerHTML = '';
const savedAnsList = this.answersList.slice();
this.answersList = [];
for (let s of this.questionTexts) {
let enumParse = this.parseEnum(s)
let inputLen = enumParse.placeholder.length
Expand Down Expand Up @@ -1010,6 +1026,9 @@ <h2 id="${this.prefix}-title" class="xlv-title"></h2>
answer.addEventListener(
'input', this.answerListener.bind(this, answer, forceUpper));
}
for (const a of savedAnsList) {
if (!a.isq) this.answersList.push(a);
}
}

Exolve.prototype.parseSubmit = function(s) {
Expand Down Expand Up @@ -4951,19 +4970,6 @@ <h2 id="${this.prefix}-title" class="xlv-title"></h2>
}

Exolve.prototype.redisplayNinas = function() {
const NINA_COLORS = [
'rgb(0,0,220)',
'rgb(0,220,0)',
'rgb(0,220,220)',
'rgb(220,0,220)',
'rgb(220,220,0)',
'rgb(220,50,50)',
'rgb(50,220,50)',
'rgb(50,50,220)',
'rgb(50,200,200)',
'rgb(200,50,200)',
'rgb(200,200,50)',
];
this.ninaGroup.innerHTML = '';
this.ninaClassElements = [];
let ninaColorIndex = 0;
Expand All @@ -4979,8 +4985,8 @@ <h2 id="${this.prefix}-title" class="xlv-title"></h2>
}
let colour = nina.colour;
if (!colour) {
colour = NINA_COLORS[ninaColorIndex];
ninaColorIndex = (ninaColorIndex + 1) % NINA_COLORS.length
colour = this.NINA_COLORS[ninaColorIndex];
ninaColorIndex = (ninaColorIndex + 1) % this.NINA_COLORS.length
}
for (let cellOrClass of nina2) {
if (!Array.isArray(cellOrClass)) {
Expand Down
4 changes: 2 additions & 2 deletions gussalufz-1-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Gussalufz</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-1-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Gussalufz</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-10-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>King's Rule</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-10-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>King's Rule</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-11-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Missing Instructions</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-11-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Missing Instructions</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-12-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Fifteen Puzzles</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-12-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Fifteen Puzzles</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-13-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Cursory Appearances</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-13-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Cursory Appearances</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-14-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Putting Two And Two Together</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-14-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Putting Two And Two Together</title>
</head>

Expand Down
4 changes: 2 additions & 2 deletions gussalufz-15-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<script src="gussalufz-15.js"></script>
<title>Al’s Trick</title>
</head>
Expand Down
4 changes: 2 additions & 2 deletions gussalufz-15-unsolved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<script src="gussalufz-15.js"></script>
<title>Al’s Trick</title>
</head>
Expand Down
4 changes: 2 additions & 2 deletions gussalufz-16-solved.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.12"/>
<script src="exolve-m.js?v1.12"></script>
<link rel="stylesheet" type="text/css" href="exolve-m.css?v1.13"/>
<script src="exolve-m.js?v1.13"></script>
<title>Untitled Crossword</title>
</head>

Expand Down
Loading

0 comments on commit b9d86e0

Please sign in to comment.