<commit_before>package Games::Construder::Client;
use common::sense;
use Compress::LZF;
use Games::Construder::Client::Frontend;
use Games::Construder::Client::World;
use Games::Construder::Protocol;
use Games::Construder;
use AnyEvent;
use AnyEvent::Socket;
use AnyEvent::Handle;
use Math::VectorReal;
use Benchmark qw/:all/;

use base qw/Object::Event/;

=head1 NAME

Games::Construder::Client - desc

=head1 SYNOPSIS

=head1 DESCRIPTION

=head1 METHODS

=over 4

=item my $obj = Games::Construder::Client->new (%args)

=cut

sub new {
   my $this  = shift;
   my $class = ref ($this) || $this;
   my $self  = { @_ };
   bless $self, $class;

   $self->init_object_events;

   Games::Construder::World::init (sub {
   }, sub { });

   $self->{res} = Games::Construder::Client::Resources->new;
   $self->{res}->init_directories;
   $self->{res}->load_config;
   $Games::Construder::Client::UI::RES = $self->{res};

   $self->{front} =
      Games::Construder::Client::Frontend->new (res => $self->{res}, client => $self);

   $self->{front}->reg_cb (
      update_player_pos => sub {
         $self->send_server ({ cmd => "player_pos", pos => $_[1], look_vec => $_[2] });
      },
      position_action => sub {
         my ($front, $pos, $build_pos, $btn) = @_;
         $self->send_server ({
            cmd => "pos_action", pos => $pos,
            build_pos => $build_pos, action => $btn
         });
      }
   );

   $self->connect (localhost => 9364);

   return $self
}

sub start {<commit_msg>added developement testing destination host/port via @ARGV.<commit_after>package Games::Construder::Client;
use common::sense;
use Compress::LZF;
use Games::Construder::Client::Frontend;
use Games::Construder::Client::World;
use Games::Construder::Protocol;
use Games::Construder;
use AnyEvent;
use AnyEvent::Socket;
use AnyEvent::Handle;
use Math::VectorReal;
use Benchmark qw/:all/;

use base qw/Object::Event/;

=head1 NAME

Games::Construder::Client - desc

=head1 SYNOPSIS

=head1 DESCRIPTION

=head1 METHODS

=over 4

=item my $obj = Games::Construder::Client->new (%args)

=cut

sub new {
   my $this  = shift;
   my $class = ref ($this) || $this;
   my $self  = { @_ };
   bless $self, $class;

   $self->init_object_events;

   Games::Construder::World::init (sub {
   }, sub { });

   $self->{res} = Games::Construder::Client::Resources->new;
   $self->{res}->init_directories;
   $self->{res}->load_config;
   $Games::Construder::Client::UI::RES = $self->{res};

   $self->{front} =
      Games::Construder::Client::Frontend->new (res => $self->{res}, client => $self);

   $self->{front}->reg_cb (
      update_player_pos => sub {
         $self->send_server ({ cmd => "player_pos", pos => $_[1], look_vec => $_[2] });
      },
      position_action => sub {
         my ($front, $pos, $build_pos, $btn) = @_;
         $self->send_server ({
            cmd => "pos_action", pos => $pos,
            build_pos => $build_pos, action => $btn
         });
      }
   );

   $self->connect ($ARGV[1] || localhost => $ARGV[2] || 9364);

   return $self
}

sub start {
{'fraction_non_alphanumeric': 0.18888166449934982, 'fraction_numerical': 0.007802340702210663, 'mean_word_length': 3.5450516986706058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4529029', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1100, 'n_words': 228}