reset
callreset: function (customSeed) {
let seed = customSeed;
if (seed === undefined) {
seed = '' + new Date().getTime();
}
Math.seedrandom(seed);
let solution = [];
let state = [];
let total = 0;
5
let charmHeight = this.get('dimensionHeight');
let charmWidth = this.get('dimensionWidth');
if (isCharminGallery(seed)) {
[state, solution, total] = getCharmSolveInformation(seed);
} else {
for (let i = 0; i < charmHeight; i++) {
solution[i] = [];
state[i] = [];
for (let j = 0; j < charmWidth; j++) {
let random = Math.ceil(Math.random() * 2);
solution[i][j] = random;
total += (random - 1);
state[i][j] = 0;
}
}
}
let hintsX = this.getHints(solution, "x");
let hintsY = this.getHints(solution, "y");
// state = solution; // DEV TEST
this.set({
state: state,
hintsX: hintsX,
hintsY: hintsY,
guessed: 0, // total, // DEV TEST
total: total,
complete: false,
perfect: false,
seed: seed
}, {
silent: true
});
this.trigger('change');
},
reset: function (customSeed) {
let seed = customSeed;
if (seed === undefined) {
seed = '' + new Date().getTime();
}
Math.seedrandom(seed);
let solution = [];
let state = [];
let total = 0;
5
let charmHeight = this.get('dimensionHeight');
let charmWidth = this.get('dimensionWidth');
if (isCharminGallery(seed)) {
[state, solution, total] = getCharmSolveInformation(seed);
} else {
for (let i = 0; i < charmHeight; i++) {
solution[i] = [];
state[i] = [];
for (let j = 0; j < charmWidth; j++) {
let random = Math.ceil(Math.random() * 2);
solution[i][j] = random;
total += (random - 1);
state[i][j] = 0;
}
}
}
let hintsX = this.getHints(solution, "x");
let hintsY = this.getHints(solution, "y");
// state = solution; // DEV TEST
this.set({
state: state,
hintsX: hintsX,
hintsY: hintsY,
guessed: 0, // total, // DEV TEST
total: total,
complete: false,
perfect: false,
seed: seed
}, {
silent: true
});
this.trigger('change');
},
#include <iostream>
int main(void) {
std::cout << "Hello!!!";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>1024x64 Grid</title>
<style>
.grid-container {
display: grid;
grid-template-columns: repeat(1024, 1fr);
grid-template-rows: repeat(64, 1fr);
gap: 1px;
}
.grid-item {
width: 10px;
height: 10px;
background-color: #ccc;
}
</style>
</head>
<body>
<div class="grid-container">
<script>
const container = document.querySelector('.grid-container');
for (let i = 0; i < 1024 * 64; i++) {
const item = document.createElement('div');
item.className = 'grid-item';
container.appendChild(item);
}
</script>
</div>
</body>
</html>
(edited).cur
filesmochi_normal_select
sprite mochi_normal_select
sprite Add a Game