1 #!/usr/local/bin/perl -w
2 ##########################################################################
4 # Copyright (c) 2003 Aymargeddon Development Team
6 # This file is part of "Last days of Aymargeddon"
8 # Aymargeddon is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by the Free
10 # Software Foundation; either version 2 of the License, or (at your option)
13 # Aymargeddon is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc., 675
19 # Mass Ave, Cambridge, MA 02139, USA.
21 ###########################################################################
26 # creates the world to destroy
28 # usage: ./create.pl [number of eartlings]
32 # TODO: use FROGS/DataBase.pm instead of DBI.pm
38 use POSIX qw(floor ceil);
44 my $map = new HexTorus($n);
46 for my $y (0..($n - 1)){
47 for my $x ( 0 .. ($n*2-1)){
50 $map->distance(Location->new(5,0),
51 Location->new($x,$y));
52 $d = "0$d" if $d < 10;
55 $out .= "\n" . (' ' x ($y +1));