* folgende Perl-Module müssen vorhanden sein:
- Date::Calc;
- Mail::Mailer;
- Data::Dumper;
+ Date::Calc
+ Mail::Mailer
+ Data::Dumper
+ JSON
+
+ gibts alle auch als Debian-Pakete.
* MySQL als DBMS
+++ /dev/null
-#!/bin/sh
-
-grep $1 src/*.pl src/*.pm src/FROGS/*.pm html/*.epl var/*.sql
-
--- /dev/null
+#!/bin/sh
+
+grep $1 src/*.pl src/*.pm src/FROGS/*.pm html/*.epl var/*.sql
+
[-
my $lang = 'DE'; # TODO: use DEFAULT_LANGUAGE from config
- # TODO BUG: default-language looks to be allways EN here...
+ # TODO BUG: default-language seems to be allways EN here...
$lang = $udat{-lang} if exists $udat{-lang};
$new_passwd = $db->new_account($fdat{'newlogin'},
@Aymargeddon::ISA = qw(Game);
sub new{
- my ($class,$game,$user,$db,$lang) = @_;
+ my ($class,$game,$user,$db,$lang) = @_; #TODO: $lang not used here?
my $self = Game->new($game,$user,$db);
my $self = shift;
unless (exists $self->{-map}){
+ # TODO: HOME dupplication correct?
$self->{-map} = $self->read_map("TERRAIN,HOME,OCCUPANT,TEMPLE,PLAGUE,HOME");
}
return $self->{-map};
# TODO?: send messages
}
+# returns a hash with all data wich is affected from the command
+sub affected{
+ my $self = shift;
+
+ my $aff = $self->{-affected};
+ for my $field (@{$aff->{-fields}}){
+ #TODO? build field data
+ }
+
+ return $aff;
+}
+
+# returns a JSON-Object with all new infos which should displayd from client
+sub first_phase_ajax{
+ my $self = shift;
+
+ my $ret = $self->first_phase();
+ #TODO: which part of the logic in execute() is needed here?
+
+ my $aff = $self->affected();
+ use JSON;
+ return encode($aff);
+
+}
+
sub setDuration {
# sets the duration of the command in units. Sheduler will schedule
# the Phase 2 then for gametime+units*pace(game).
--- /dev/null
+#!/bin/sh
+
+grep $1 src/*.pl src/*.pm src/FROGS/*.pm html/*.epl
+