From 65c02784b5703dbacafe3ce2efca5529095dfcb7 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 3 Dec 2011 16:02:04 +0100 Subject: [PATCH] client/example: Moar debug --- client/example.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/example.pl b/client/example.pl index 3254d49..23cddee 100755 --- a/client/example.pl +++ b/client/example.pl @@ -109,11 +109,13 @@ sub take_action($%) { } if ($move[dirindex($dir)] > $move[dirindex($max)] or - ($move[dirindex($dir)] == $move[dirindex($max)]) and (int rand(2))) { + ($move[dirindex($dir)] == $move[dirindex($max)] and int rand(2))) { $max = $dir; } } + print "moves ".join(", ", @move)."\n"; + if ($attack[dirindex($max)]) { print $socket "attack_dir $max->[0] $max->[1]\r\n"; } else {