From a3d768bdb56c7378e3e9014b4f726ae157fc12db Mon Sep 17 00:00:00 2001 From: Andrew Ekstedt Date: Fri, 8 Dec 2023 03:35:54 +0000 Subject: [PATCH] the hand speaks --- day07/sol.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/day07/sol.tcl b/day07/sol.tcl index f501c97..49f73af 100755 --- a/day07/sol.tcl +++ b/day07/sol.tcl @@ -68,12 +68,14 @@ proc cmp {a b} { return [expr {($b < $a) - ($a < $b)}] } proc xbeats {hand1 hand2} { set x [beats $hand1 $hand2] - if {$x < 0} {puts "$hand1 beats $hand2"} \ + if {$x < 0} {puts "$hand1 beats $hand2"} \ elseif {$x > 0} {puts "$hand2 beats $hand1"} \ - else {puts "$hand1 ties $hand2"} + else {puts "$hand1 ties $hand2"} return $x } +# take a look at these hands +# take a look at these hands proc beats {hand1 hand2} { #puts "cmp $hand1 $hand2" set r1 [type $hand1]