Compare commits
No commits in common. "f0426bbf090dc520acb7b58b40ff53d59bff8259" and "d10dbc57b96bf9fa8ad2dae93599e16c0bec0a55" have entirely different histories.
f0426bbf09
...
d10dbc57b9
@ -1,10 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<title>Visual Pushbox 2024</title>
|
<title>Visual Pushbox 2024</title>
|
||||||
<link rel="stylesheet" href="normalize.css" />
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -17,32 +14,27 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="control-panel">
|
<div id="control-panel">
|
||||||
<div class="ctrl-title">Analyzer</div>
|
<div class="ctrl-title">Analyzer</div>
|
||||||
<table class="full-width info-table"><tbody><tr>
|
|
||||||
<td><table class="info-table full-width" id="analyze-info-table"><tbody>
|
|
||||||
<tr><td>Status:</td><td id="analyze-status" class="text-right">Not Analyzed</td></tr>
|
|
||||||
<tr><td>Total Steps:</td><td id="analyze-steps" class="text-right">N/A</td></tr>
|
|
||||||
</tbody></table></td>
|
|
||||||
<td><button id="analyze" class="">Analyze</button></td>
|
|
||||||
</tr></tbody></table>
|
|
||||||
<div class="ctrl-title top-margin">Playback</div>
|
|
||||||
<table class="full-width info-table"><tbody>
|
<table class="full-width info-table"><tbody>
|
||||||
<tr>
|
<tr><td>Analyze Status:</td><td id="analyze-status" class="text-right">Not Analyzed</td></tr>
|
||||||
<td id="progress-value"><span id="current-progress">0</span>/<span id="full-progress">0</span></td>
|
<tr><td>Total Steps:</td><td id="analyze-steps" class="text-right">N/A</td></tr>
|
||||||
<td id="progress-remain" class="text-right">-0</td>
|
|
||||||
</tr>
|
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
<div id="progress-bar" class="full-width">
|
<div class="btn-group full-width top-margin">
|
||||||
|
<button id="analyze" class="btn float-left full-width">Analyze</button>
|
||||||
|
</div>
|
||||||
|
<div class="ctrl-title top-margin">Playback</div>
|
||||||
|
<div id="progress-indicator">
|
||||||
|
<div id="progress-value" class="float-left">415 / 1618</div>
|
||||||
|
<div id="progress-left" class="float-right">-1203</div>
|
||||||
|
</div>
|
||||||
|
<div id="progress-bar" class="full-width top-margin">
|
||||||
<div id="progress-bar-fg" class="full-height"></div>
|
<div id="progress-bar-fg" class="full-height"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="progress-controls" class="full-width">
|
<div class="ctrl-title top-margin">Import / Export</div>
|
||||||
<a href="javascript:void(0)" class="abtn" id="progressctl-prev">Prev</a>
|
<textarea autocomplete="off" spellcheck="false" id="maze_charmap"></textarea>
|
||||||
<a href="javascript:void(0)" class="abtn" id="progressctl-next">Next</a>
|
<div id="charmap_controls" class="btn-group full-width top-margin">
|
||||||
<a href="javascript:void(0)" class="abtn" id="progressctl-auto">Play</a>
|
<button id="charmap_import" class="btn float-left">Import</button>
|
||||||
<a href="javascript:void(0)" class="abtn" id="progressctl-reset">Reset</a>
|
<button id="charmap_export" class="btn float-right">Export</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="ctrl-title top-margin">Edit</div>
|
|
||||||
<textarea autocomplete="off" spellcheck="false" id="maze-charmap"></textarea>
|
|
||||||
<button id="charmap_import" class="btn full-width top-margin">Import</button>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
@ -51,26 +43,13 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
#analyze-info-table {
|
|
||||||
width: 215px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#analyze {
|
|
||||||
height: 38px;
|
|
||||||
width: 75px;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
background-color: #f6f6c6;
|
|
||||||
}
|
|
||||||
|
|
||||||
#progress-bar {
|
#progress-bar {
|
||||||
background-color: lightgrey;
|
background-color: lightgrey;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#progress-bar-fg {
|
#progress-bar-fg {
|
||||||
|
width: 30%;
|
||||||
background-color: orange;
|
background-color: orange;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +95,6 @@ textarea {
|
|||||||
resize: none;
|
resize: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ctrl-title {
|
.ctrl-title {
|
||||||
@ -146,21 +124,23 @@ textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.float-left {
|
.float-left {
|
||||||
|
display: inline-block;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-right {
|
.float-right {
|
||||||
|
display: inline-block;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
#maze-charmap {
|
#maze_charmap {
|
||||||
width: calc(100%);
|
width: calc(100% - 2px);
|
||||||
height: 300px;
|
height: 298px;
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
font-size: 13px;
|
font-size: 13.33px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,6 +149,7 @@ textarea {
|
|||||||
height: 80vh;
|
height: 80vh;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
display: inline-block;
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -193,7 +174,7 @@ textarea {
|
|||||||
|
|
||||||
.maze-mv {
|
.maze-mv {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
/* transition: top 0.2s, left 0.2s; */
|
transition: top 0.2s, left 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sqr-wall {
|
.sqr-wall {
|
||||||
|
@ -67,64 +67,20 @@ class BoardUI {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function fillTemplate(id, val) {
|
|
||||||
document.getElementById(id).innerHTML = val.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateProgressBar(p) {
|
|
||||||
document.getElementById('progress-bar-fg').style.width = `${p}%`;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const charmap_input = document.getElementById('maze-charmap');
|
const charmap_input = document.getElementById('maze_charmap');
|
||||||
const analyze_button = document.getElementById('analyze');
|
const analyze_button = document.getElementById('analyze');
|
||||||
const analyze_status_element = document.getElementById('analyze-status');
|
const analyze_status_element = document.getElementById('analyze-status');
|
||||||
let board = new BoardUI();
|
let board = new BoardUI();
|
||||||
let maze = null, analyze_res = null, current_progress = 0;
|
let maze = null, analyze_res = null;
|
||||||
let autoplay_timer = null;
|
|
||||||
let current_worker = null;
|
let current_worker = null;
|
||||||
|
|
||||||
function stopAutplay() {
|
|
||||||
if (autoplay_timer != null) {
|
|
||||||
clearInterval(autoplay_timer);
|
|
||||||
autoplay_timer = null;
|
|
||||||
fillTemplate('progressctl-auto', 'Play');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetAnalyze() {
|
function resetAnalyze() {
|
||||||
stopAutplay();
|
document.getElementById('analyze-status').innerHTML = 'Not Analyzed';
|
||||||
analyze_status_element.innerHTML = 'Not Analyzed';
|
document.getElementById('analyze-steps').innerHTML = 'N/A';
|
||||||
fillTemplate('analyze-steps', 'N/A');
|
|
||||||
fillTemplate('current-progress', '0');
|
|
||||||
fillTemplate('full-progress', '0');
|
|
||||||
fillTemplate('progress-remain', '-0');
|
|
||||||
updateProgressBar(0);
|
|
||||||
current_progress = 0;
|
|
||||||
analyze_res = null;
|
analyze_res = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveProgress(d) {
|
|
||||||
if (analyze_res == null || analyze_res.step == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
current_progress += d;
|
|
||||||
if (current_progress < 0) {
|
|
||||||
current_progress = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current_progress > analyze_res) {
|
|
||||||
current_progress = analyze_res.step;
|
|
||||||
}
|
|
||||||
|
|
||||||
let st = analyze_res.path[current_progress];
|
|
||||||
board.updateState(st);
|
|
||||||
fillTemplate('current-progress', current_progress.toString());
|
|
||||||
fillTemplate('progress-remain', `-${analyze_res.step - current_progress}`);
|
|
||||||
updateProgressBar(current_progress * 100 / analyze_res.step);
|
|
||||||
}
|
|
||||||
|
|
||||||
function importMaze(charmap_val) {
|
function importMaze(charmap_val) {
|
||||||
let charmp = charmap_val.split('\n').map(x => x.trimEnd());
|
let charmp = charmap_val.split('\n').map(x => x.trimEnd());
|
||||||
maze = Maze.fromCharMap(charmp);
|
maze = Maze.fromCharMap(charmp);
|
||||||
@ -146,34 +102,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
importMaze(charmap_input.value);
|
importMaze(charmap_input.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('progressctl-next').addEventListener('click', function() {
|
|
||||||
moveProgress(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('progressctl-prev').addEventListener('click', function() {
|
|
||||||
moveProgress(-1);
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('progressctl-auto').addEventListener('click', function() {
|
|
||||||
if (autoplay_timer == null) {
|
|
||||||
autoplay_timer = setInterval(() => {
|
|
||||||
if (current_progress == analyze_res.step) {
|
|
||||||
stopAutplay();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
moveProgress(1);
|
|
||||||
}, 500);
|
|
||||||
fillTemplate('progressctl-auto', 'Pause');
|
|
||||||
} else {
|
|
||||||
stopAutplay();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('progressctl-reset').addEventListener('click', function() {
|
|
||||||
stopAutplay();
|
|
||||||
moveProgress(-current_progress);
|
|
||||||
});
|
|
||||||
|
|
||||||
analyze_button.addEventListener('click', function() {
|
analyze_button.addEventListener('click', function() {
|
||||||
resetAnalyze();
|
resetAnalyze();
|
||||||
if (current_worker != null) {
|
if (current_worker != null) {
|
||||||
@ -193,16 +121,15 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
current_worker.onmessage = (msg_r) => {
|
current_worker.onmessage = (msg_r) => {
|
||||||
let msg = msg_r.data;
|
let msg = msg_r.data;
|
||||||
if (msg.what === 'started') {
|
if (msg.what === 'started') {
|
||||||
analyze_status_element.innerHTML = 'Analyzing';
|
analyze_status_element.innerHTML = 'Running';
|
||||||
} else if (msg.what == 'done') {
|
} else if (msg.what == 'done') {
|
||||||
analyze_res = msg.value;
|
analyze_res = msg.value;
|
||||||
|
console.log(analyze_res);
|
||||||
|
analyze_status_element.innerHTML = 'Done';
|
||||||
|
document.getElementById('analyze-steps').innerHTML = analyze_res.step.toString();
|
||||||
current_worker.terminate();
|
current_worker.terminate();
|
||||||
current_worker = null;
|
current_worker = null;
|
||||||
analyze_button.innerHTML = 'Analyze';
|
analyze_button.innerHTML = 'Analyze';
|
||||||
analyze_status_element.innerHTML = 'Analyze Done';
|
|
||||||
fillTemplate('full-progress', analyze_res.step);
|
|
||||||
fillTemplate('analyze-steps', analyze_res.step);
|
|
||||||
fillTemplate('progress-remain', `-${analyze_res.step}`);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
current_worker.postMessage(maze);
|
current_worker.postMessage(maze);
|
||||||
|
349
analyzer/normalize.css
vendored
349
analyzer/normalize.css
vendored
@ -1,349 +0,0 @@
|
|||||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
||||||
|
|
||||||
/* Document
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the line height in all browsers.
|
|
||||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
|
||||||
*/
|
|
||||||
|
|
||||||
html {
|
|
||||||
line-height: 1.15; /* 1 */
|
|
||||||
-webkit-text-size-adjust: 100%; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sections
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the margin in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Render the `main` element consistently in IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
main {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the font size and margin on `h1` elements within `section` and
|
|
||||||
* `article` contexts in Chrome, Firefox, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 2em;
|
|
||||||
margin: 0.67em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Grouping content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Add the correct box sizing in Firefox.
|
|
||||||
* 2. Show the overflow in Edge and IE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
hr {
|
|
||||||
box-sizing: content-box; /* 1 */
|
|
||||||
height: 0; /* 1 */
|
|
||||||
overflow: visible; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
||||||
* 2. Correct the odd `em` font sizing in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
pre {
|
|
||||||
font-family: monospace, monospace; /* 1 */
|
|
||||||
font-size: 1em; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Text-level semantics
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the gray background on active links in IE 10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
a {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Remove the bottom border in Chrome 57-
|
|
||||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
abbr[title] {
|
|
||||||
border-bottom: none; /* 1 */
|
|
||||||
text-decoration: underline; /* 2 */
|
|
||||||
text-decoration: underline dotted; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
b,
|
|
||||||
strong {
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
||||||
* 2. Correct the odd `em` font sizing in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
samp {
|
|
||||||
font-family: monospace, monospace; /* 1 */
|
|
||||||
font-size: 1em; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct font size in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
small {
|
|
||||||
font-size: 80%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
|
||||||
* all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
sub,
|
|
||||||
sup {
|
|
||||||
font-size: 75%;
|
|
||||||
line-height: 0;
|
|
||||||
position: relative;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
sup {
|
|
||||||
top: -0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Embedded content
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the border on images inside links in IE 10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
img {
|
|
||||||
border-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Forms
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Change the font styles in all browsers.
|
|
||||||
* 2. Remove the margin in Firefox and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
input,
|
|
||||||
optgroup,
|
|
||||||
select,
|
|
||||||
textarea {
|
|
||||||
font-family: inherit; /* 1 */
|
|
||||||
font-size: 100%; /* 1 */
|
|
||||||
line-height: 1.15; /* 1 */
|
|
||||||
margin: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the overflow in IE.
|
|
||||||
* 1. Show the overflow in Edge.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
input { /* 1 */
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
||||||
* 1. Remove the inheritance of text transform in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
select { /* 1 */
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the inability to style clickable types in iOS and Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button,
|
|
||||||
[type="button"],
|
|
||||||
[type="reset"],
|
|
||||||
[type="submit"] {
|
|
||||||
-webkit-appearance: button;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inner border and padding in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button::-moz-focus-inner,
|
|
||||||
[type="button"]::-moz-focus-inner,
|
|
||||||
[type="reset"]::-moz-focus-inner,
|
|
||||||
[type="submit"]::-moz-focus-inner {
|
|
||||||
border-style: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restore the focus styles unset by the previous rule.
|
|
||||||
*/
|
|
||||||
|
|
||||||
button:-moz-focusring,
|
|
||||||
[type="button"]:-moz-focusring,
|
|
||||||
[type="reset"]:-moz-focusring,
|
|
||||||
[type="submit"]:-moz-focusring {
|
|
||||||
outline: 1px dotted ButtonText;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the padding in Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
fieldset {
|
|
||||||
padding: 0.35em 0.75em 0.625em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the text wrapping in Edge and IE.
|
|
||||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
|
||||||
* 3. Remove the padding so developers are not caught out when they zero out
|
|
||||||
* `fieldset` elements in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
legend {
|
|
||||||
box-sizing: border-box; /* 1 */
|
|
||||||
color: inherit; /* 2 */
|
|
||||||
display: table; /* 1 */
|
|
||||||
max-width: 100%; /* 1 */
|
|
||||||
padding: 0; /* 3 */
|
|
||||||
white-space: normal; /* 1 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
||||||
*/
|
|
||||||
|
|
||||||
progress {
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the default vertical scrollbar in IE 10+.
|
|
||||||
*/
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Add the correct box sizing in IE 10.
|
|
||||||
* 2. Remove the padding in IE 10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="checkbox"],
|
|
||||||
[type="radio"] {
|
|
||||||
box-sizing: border-box; /* 1 */
|
|
||||||
padding: 0; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="number"]::-webkit-inner-spin-button,
|
|
||||||
[type="number"]::-webkit-outer-spin-button {
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the odd appearance in Chrome and Safari.
|
|
||||||
* 2. Correct the outline style in Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="search"] {
|
|
||||||
-webkit-appearance: textfield; /* 1 */
|
|
||||||
outline-offset: -2px; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the inner padding in Chrome and Safari on macOS.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[type="search"]::-webkit-search-decoration {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
|
||||||
* 2. Change font properties to `inherit` in Safari.
|
|
||||||
*/
|
|
||||||
|
|
||||||
::-webkit-file-upload-button {
|
|
||||||
-webkit-appearance: button; /* 1 */
|
|
||||||
font: inherit; /* 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Interactive
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
details {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Add the correct display in all browsers.
|
|
||||||
*/
|
|
||||||
|
|
||||||
summary {
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Misc
|
|
||||||
========================================================================== */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 10+.
|
|
||||||
*/
|
|
||||||
|
|
||||||
template {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the correct display in IE 10.
|
|
||||||
*/
|
|
||||||
|
|
||||||
[hidden] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
@ -167,6 +167,7 @@ export class AnalyzeContext {
|
|||||||
while (q.size()) {
|
while (q.size()) {
|
||||||
let x = q.front();
|
let x = q.front();
|
||||||
q.pop();
|
q.pop();
|
||||||
|
console.log(x.toString());
|
||||||
|
|
||||||
let dis = this.dis[x.asHash()];
|
let dis = this.dis[x.asHash()];
|
||||||
if (x.box.equals(this.maze.target) && this.step == -1) {
|
if (x.box.equals(this.maze.target) && this.step == -1) {
|
||||||
@ -183,6 +184,7 @@ export class AnalyzeContext {
|
|||||||
|
|
||||||
let yh = y.asHash();
|
let yh = y.asHash();
|
||||||
if (y.isValidInMaze(this.maze) && this.dis[yh] == -1) {
|
if (y.isValidInMaze(this.maze) && this.dis[yh] == -1) {
|
||||||
|
console.log(y.toString());
|
||||||
this.dis[yh] = dis + 1;
|
this.dis[yh] = dis + 1;
|
||||||
this.source[yh] = x.clone();
|
this.source[yh] = x.clone();
|
||||||
q.push(y);
|
q.push(y);
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
.##.....##...#....##
|
|
||||||
....##..#..#...##..#
|
|
||||||
#*##..#.#.#.###..#..
|
|
||||||
P.....#.#.#...#...#.
|
|
||||||
...#..#...#......#..
|
|
||||||
###..#.###.#.##.#..#
|
|
||||||
..##.##...##..#.#...
|
|
||||||
......#.......#..##.
|
|
||||||
..#....#.#.#..#.#...
|
|
||||||
..######.##.###.#.##
|
|
||||||
#.##..#..##...#.#...
|
|
||||||
......#.......#.###.
|
|
||||||
...#..#..##.##...#..
|
|
||||||
####..#####.##...#.#
|
|
||||||
..##.#....#..#.###..
|
|
||||||
......#.....#..#..#.
|
|
||||||
..#...##.##.#.....#.
|
|
||||||
#.######..#..###..#.
|
|
||||||
..........#...##.##.
|
|
||||||
...##.##..#..#O.....
|
|
Loading…
x
Reference in New Issue
Block a user