From 8f5f62cf70619b7044980ec7fce11e3d455fddd2 Mon Sep 17 00:00:00 2001 From: Kresten Krab Thorup Date: Sun, 22 Apr 2012 23:53:31 +0200 Subject: [PATCH] Switch order ABCX -> CBAX in visualizer This makes it so that the youngest file is always more left, and older files are always more right. --- visualize-hanoi.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/visualize-hanoi.sh b/visualize-hanoi.sh index c7d4aa8..bb6f02b 100644 --- a/visualize-hanoi.sh +++ b/visualize-hanoi.sh @@ -54,8 +54,8 @@ function dynamic() { while true ; do s="" for ((i=7; i<25; i++)) ; do - if [ -f "A-$i.data" ] ; then - s="${s}A" + if [ -f "C-$i.data" ] ; then + s="${s}C" else s="$s " fi @@ -64,8 +64,8 @@ function dynamic() { else s="$s " fi - if [ -f "C-$i.data" ] ; then - s="${s}C" + if [ -f "A-$i.data" ] ; then + s="${s}A" else s="$s " fi