Ain't it funny how the knight moves?
111–120 of 211 posts
Re: Ain't it funny how the knight moves?
#112I mapped out the structure of the board as a graph of which squares you can get to from which other squares. It's surprisingly stringy without all the squares forbidden by the queen placement. https://i.imgur.com/8OuQcu8.png
I'm used to a version with pawns that involves less backtracking, so it took me a little while to stop trying to be "smarter" and just be okay with continually returning to home base.
Re: Ain't it funny how the knight moves?
#113Re: Ain't it funny how the knight moves?
#114Love it. Anyone found a strategy better than “choose a path that will get you there that has a square in the largest quadrant, and jump from there”?
Incidentally, this is also a good strategy for planning and breaking down goals in real life: begin with the end goal, then work your way backwards.
Re: Ain't it funny how the knight moves?
#115I think the instructions should be: Move to the square indicated below the board without moving to a square the queen can capture and without capturing the queen. Once accomplished a new square will be indicated. Repeat until all possible squares are done.
A short note about how the coordinates work would also be helpful, or just highlight the target square, because not everyone knows chess notation by heart. I tried two different interpretations (both wrong) before finally resolving to google for it.
Re: Ain't it funny how the knight moves?
#116Ok, shameless plug. I did a pretty “popular” version of this. https://knight-queen-game.netlify.app/
Re: Ain't it funny how the knight moves?
#117Earlier quoted context omitted.
Judging by this thread every single person did the same thing and became equally frustrated (myself included).
Well, it's the one thing the directions didn't actually say: The goal of the game. I'd be shocked if anyone went to that site and could figure out what to do.
Re: Ain't it funny how the knight moves?
#118I think the instructions should be: Move to the square indicated below the board without moving to a square the queen can capture and without capturing the queen. Once accomplished a new square will be indicated. Repeat until all possible squares are done.
// Get all square elements
squareElements = [...document.querySelectorAll("[data-testid='white-square']"), ...document.querySelectorAll("[data-testid='black-square']")];
// create array of elements that have been landed on
// these need to be set to red every time because the board resets every move
let modifiedElements = [];
observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
if (mutation.addedNodes.length > 0) {
mutation.addedNodes.forEach(function(addedNode) {
key = addedNode.getAttribute('data-testid').split('-')[1];
if (!modifiedElements.includes(key)) {
modifiedElements.push(key);
}
for (let i = 0; i {
return e.getAttribute('data-squareid') === modifiedElements[i]
})
el.style.backgroundColor = 'red';
}
});
}
});
});
// observe all square elements
for (let i = 0; i Re: Ain't it funny how the knight moves?
#119As a teenager I had a chess lesson with Ben Finegold and I practiced this puzzle for weeks on a physical board. He also mentioned this riddle off hand which I had a ton of fun solving. https://fivethirtyeight.com/features/how-about-a-nice-game-o...
[1] https://fivethirtyeight.com/features/can-you-survive-this-de...
Re: Ain't it funny how the knight moves?
#120I think the instructions should be: Move to the square indicated below the board without moving to a square the queen can capture and without capturing the queen. Once accomplished a new square will be indicated. Repeat until all possible squares are done.
here's a script that will highlight previously visited squares as red. as a nice bonus it replaces the instructions with more accurate ones // Get all square elements squareElements = [...document.querySelectorAll("[data-testid='white-square']"), ...document.querySelectorAll("[data-testid='black-square']")]; // create array of elements that have been landed on // these need to be set to red every time because the boa…