Skip to content

Latest commit

 

History

83 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knights of the Round Square https://jsfiddle.net/frogg616/hy2etufr/32/

example gif

Just a fun challenge I read about on Quora.

Here are the rules

  1. Start with a grid that has even numbers. Ideally 8x8
  2. Have a program randomly select a starting block on that grid
  3. Then have the program move to each block one by one until it has visted each block once and only once.
  4. Have it return to the start point.
  5. You can use any programming method you want. I chose this method over "randomly choosing paths until successful" because I wanted to simulate thought

You can view main.html for a working example (since it's in jQuery it's pretty heavy)

If you want to try it out on your own you can download baseTemplate.html which gives you the grid and a couple other useful functions but leaves the logic entirely up to you.

Legend

  1. Space bar - start/stop
  2. Right command key - do one rotation
  3. Click on board, make sure it is yellow. Use arrow keys to manually move the position.

If you see any that don't work, let me know. Also, for fun, try to break it yourself. Be fair and give it a solvable solution though.

Good luck! Let me know if you do break it!

About

Just a fun programming challenge. Try to see if you can fool it.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages