We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2e6a87 commit 7b400c2Copy full SHA for 7b400c2
written/public/games/queens.html
@@ -2,11 +2,12 @@
2
<head>
3
<title>Queens</title>
4
<script>
5
+ const maxBoardSize = 10;
6
// Generate the column rules
7
const style = document.createElement("style");
8
let cssRules = "";
9
- for (let i = 1; i <= 10; i++) {
10
+ for (let i = 1; i <= maxBoardSize; i++) {
11
cssRules += `
12
#app:has(.row > *:nth-child(${i}):is(.cell.queen)) .row > *:nth-child(${i}):after,
13
`;
@@ -26,8 +27,8 @@
26
27
[1, 1],
28
];
29
30
- for (let j = 1; j <= 10; j++) {
31
+ for (let j = 1; j <= maxBoardSize; j++) {
32
directions.forEach(([di, dj]) => {
33
34
#app:has(.row:nth-child(${i}) > *:nth-child(${j}):is(.cell.queen)) .row:nth-child(${
0 commit comments