开发者

Java applet for Tower of Hanoi

开发者 https://www.devze.com 2022-12-31 04:37 出处:网络
I am planning to write a Java applet for Tower 开发者_开发百科of Hanoi similar to link( http://www.mazeworks.com/hanoi/index.htm )

I am planning to write a Java applet for Tower 开发者_开发百科of Hanoi similar to link( http://www.mazeworks.com/hanoi/index.htm ) Can you suggest how should I start and proceed.

And, btw, does it require multi threading?

And also, major part of my doubt is

  • to make a disc being clickable and being able to drag and drop the disc on a tower.

  • detect a tower (if a disc is being dragged using mouse)


I would start with this http://www.rstack.com/hanoi/hanoi_src.html or http://stud1.tuwien.ac.at/~e9125168/javaa/jtower.html. As far as threading see my comment on Jonathan M Davis's answer.


You can do it with javafx it is easier than core java. Here is an example

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号