]> www.fi.muni.cz Git - slotcarman.git/blobdiff - SCX/Car.pm
Make cars aware of their IDs.
[slotcarman.git] / SCX / Car.pm
index 165d09ecb66d97f934a0ae9d90302d5e097ca977..7dffb7a5361df8d184e1a303884e07f8aa5575c8 100644 (file)
@@ -3,16 +3,17 @@
 package SCX::Car;
 
 use strict;
+use Time::HiRes qw(gettimeofday);
 
 sub new {
        my ($class, $args) = @_;
 
        my $self = {
-               gui => $args->{gui},
+               gui      => $args->{gui},
                throttle => -1,
-               fuel => -1,
-               order => $args->{order},
-               track => $args->{track},
+               fuel     => -1,
+               id       => $args->{id},
+               track    => $args->{track},
        };
 
        bless $self, $class;