I write an Android Java program to "animate" the moving of Tower of
Hanoi.
The drawing does not show in steps I expected, instead it shows in a
chunk at the end of the drawing. Why?
Also, I use BLUE color to "erase" the discs moved, then use BLACK
color to draw the missing stick portion. BUT, it does not use the BLUE
color at all, instead it uses BLACK.
It does work for the RED color that I used to paint the discs. Then,
why not the BLUE?  I painted the BLUE first (to "erase the disc moved,
but it also erased portion of the stick), then BLACK (to recover the
missing stick portion), then RED (the disc that's moved to the other
stick).
The scenario can been seen in my personal website -
1. I set the disc number to be 5.
http://homepage8.seed.net.tw/web@3/heuristic/TOH_Set051411001.JPG
2. Then, I start the moving. (I used the sleep timer so that it won't
move too fast.)
http://homepage8.seed.net.tw/web@3/heuristic/TOH_Start051411001.JPG
3. It ends up with the BLACK piles of the discs on the two other
sticks as shown on the following URL: 
http://homepage8.seed.net.tw/web@3/heuristic/TOH_End051411001.JPG

I wrote this Java program long time ago using Java Applet. Now, I just
changed the interface to be Android GUI/API interface.
The old program works fine on my website (in fact, in my all
showoffs.) -
http://homepage8.seed.net.tw/web@3/heuristic/tohjava.html

This program was developed on Android 2.1-updated. I just ported to
3.0, it shows the first time, then halts there. I haven't got time to
figure out.

This is a very good educational material - to teach Math, Java,
Computer Sciences, etc.
Hope experienced Android guy can share experience here. This is a
little bit like the "flush" in some i/o problem. Sometimes, if you
don't flush, there is no output. So, why Android does not show the
drawing out right away, instead it waits until the end of the drawing.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to