Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am developing a 15 puzzle sliding puzzle game using JavaScript. As half of the combinations in a 15 puzzle is unsolvable I use the formula in http://mathworld.wolfram.com/15Puzzle.html to check the solvability.
I am currently adding the option to switch to 8 puzzle (3x3).
Are there unsolvable combinations in 8 puzzle too? If so can I use the same formula for it too?
Yes, half of the configurations of a n-puzzle game are unsolvable as stated here and here.
Also you can apply the same criterion: the number of inversions of the permutation shall be even.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
I am working on a HTML5 version of the game like this one - https://youtu.be/nlWNWKNEgAM?t=15, unable to find the logic used for bee movements, can someone help me in finding the logic used in the bee movements like in the video - what kind of algorithm is used
I have tried boids movement ,but it looks different
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a scale that shows a timeline of 15 years. All the events are drawn as rect in that timeline and everything works fine. But when I have a short event like 2 days or so you do not see the event until you zoom in that particular timespan. Do you have any idea how I could make it seen already without zooming? Adding some days to the event to make it seen from the beginning would solve the problem only as long as I do not zoom to see the wrong timespan. Any ideas?
Use .append('line') instead of .append('rect') solves the problem.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
we need to create some buttons to zoom in/zoom out. Also need to set zooming limitation. Is it possible to do these things?
Yes, this is possible using axis SetMinMax method as in the example Yeray posted here. Using SetMinMax you can set the zoom factor and also limit the maximum and minimum zoom levels.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a client requirement to set line space to 1 1/2 (1.5). It's for setting line-height while creating PDF through PHP, and the PDF is a court document (US).
I am not a designer guy, and I am unable to understand the requirement. If some could help me to understand the requirement it will be really helpful for me.
I believe the 1.5 is 1.5x line-height.
Refer to the line-height property in CSS.
This is probably a document requirement ... that there be space between lines, like setting line spacing in MS Word.
The comparable in HTML/css would be CSS setting: line-height.
See https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Consider the example shown in the link Labeling the axis with alphanumeric characters. How to create multiple arrays for the var data ? i.e. two separate for the lines [2,2],[3,3],[4,4],[5, 4],[5.5, 5] and [6, 6],[6, 7],[6.5,8],[6.5,16],[17, 16] ?
If I understand you, I think at this point, you want to start factoring out your code. So, building on this EXAMPLE I have built for you before (inside my comment), here is an UPDATED FIDDLE with both lines. You can factor out the code some more, but this should get you going.
// begin of drawing dots
drawDots(data);
drawDots(data2);
// end of drawing dots