1 #!/usr/local/bin/perl -w
2 ##########################################################################
4 # Copyright (c) 2003-2012 Aymargeddon Development Team
6 # This file is part of "Last days of Aymargeddon" - a massive multi player
7 # onine game of strategy
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU Affero General Public License as
11 # published by the Free Software Foundation, either version 3 of the
12 # License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # See the GNU Affero General Public License for more details.
20 # You should have received a copy of the GNU Affero General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ###########################################################################
28 # creates the world to destroy
30 # usage: ./create.pl [number of eartlings]
34 # TODO: use FROGS/DataBase.pm instead of DBI.pm
40 use POSIX qw(floor ceil);
46 my $map = new HexTorus($n);
48 for my $y (0..($n - 1)){
49 for my $x ( 0 .. ($n*2-1)){
52 $map->distance(Location->new(5,0),
53 Location->new($x,$y));
54 $d = "0$d" if $d < 10;
57 $out .= "\n" . (' ' x ($y +1));