Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
|
|
@ -1,8 +1,8 @@
|
|||
function move(n, a, b, c) {
|
||||
if (n > 0) {
|
||||
move(n-1, a, c, b);
|
||||
console.log("Move disk from " + a + " to " + c);
|
||||
move(n-1, b, a, c);
|
||||
}
|
||||
if (n > 0) {
|
||||
move(n-1, a, c, b);
|
||||
console.log("Move disk from " + a + " to " + c);
|
||||
move(n-1, b, a, c);
|
||||
}
|
||||
}
|
||||
move(4, "A", "B", "C");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue