Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Coder's Corner » Program that solves the "Orientation Puzzle" » 2015-07-31 05:49:26

TheLinker
Replies: 0

Hello mates smile

A few months ago I was checking out the Puzzle Games at MathsIsFun and stumbled upon this Orientation Puzzle. At first I didn't quite get it, but after about one or two minutes I understood it all. So, after playing some levels I've had the idea of implementing an algorithm that could solve any level. So I did it (that was actually quite a while back) and decided to share it with ya: Here's the source code and the level files (C++).

It's a command line program. compile it and put the "Levels" folder in the same directory as the executable. Open a command prompt window on that directory. Every time you want the program to solve a level, just type the name of the executable on the prompt, press enter and type the name of a level file contained in the "Levels" folder, for example: Levels/1.txt. The program will then display all the steps needed to get into the exit.
OrientationPuzzleScreenShot.png

EDIT: I don't seem to be able to post the download link to the compiled executable sad

Board footer

Powered by FluxBB