GitXplorerGitXplorer
d

hanoigl

public
1 stars
0 forks
1 issues

Commits

List of commits on branch master.
Unverified
23d1a6f59cd89e44c8df920686a34799087f1c05

move borland-specific stuff into bc5/

dd0k committed 18 years ago
Unverified
d7c8f147486691761f47a84cd0c492b8c1b4054b

some cleanup

dd0k committed 18 years ago
Unverified
711c2ef5ab18619744529e9c3343710bee687b38

license

dd0k committed 18 years ago
Unverified
0f4663627c1d97fa66449e2bb3ecbe853138e817

.gitignore; cleanup

dd0k committed 18 years ago
Unverified
e47eebe3d24461f04e5acd0e84535b6ab223e825

adjust file permissions

dd0k committed 18 years ago
Unverified
524c3b85289167f9162cb2b3906ccd4742174210

initial commit

dd0k committed 18 years ago

README

The README file for this repository.

hanoigl

Towers of Hanoi visualization in OpenGL. With automatic or manual movement.

Dependencies

  • OpenGL (or Mesa)
  • GLUT (or freeglut on linux)
  • CMake

Usage

To change the disk count you may edit disks.txt. There is an artifical limit on 20 disks so you don't shoot yourself in the foot by memory usage.

Interface

The upper left corner shows the elapsed time in seconds, the count of elapsed
movements and the movement count for the optimal solution.

Keyboard
~~~~~~~~
 - Camera movements with cursor keys
 - Reset view with space
 - zoom with '+' and '-' keys
 - toggle fullscreen with 'f'
 - reset animation with 'r'
 - change animation speed with 's' and 'x'

Manual Movement

Currently you can't switch to manual movement at runtime. You can change the setting in main.c and recompile.

  • use the keys '1', '2' and '3' to move between the pins
  • e. g. if you wan't to take the upmost disk from pin 1 and put it on pin 3 you must press '1' '3' consecutively