From 3889fba5d4dcc09553f7aa5fa685b56d197245f2 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 23 Dec 2011 18:49:14 +0100 Subject: [PATCH] Example client: Invest energy/5 into attack, instead of fixed 100 --- client/example.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/example.pl b/client/example.pl index dea7f2d..6bc8b66 100755 --- a/client/example.pl +++ b/client/example.pl @@ -170,7 +170,7 @@ sub take_action($$) { # Execute actions! if ($attack[dirindex($max)]) { - print $socket $state->{tick}." attack_dir $max->[0] $max->[1] 100\r\n"; + print $socket $state->{tick}." attack_dir $max->[0] $max->[1] ".($state->{energy}/5)."\r\n"; } else { print $socket $state->{tick}." move_dir $max->[0] $max->[1]\r\n"; }