blib/lib/Game/TextMapper/Constants.pm

filter: Statementstmt 100% 6 / 6 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 6 / 6 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« blib/lib/Game/TextMapper/Mapper/Hex.pm ↑ Summary
1 # Copyright (C) 2009-2021 Alex Schroeder <alex@gnu.org>
2 #
3 # This program is free software: you can redistribute it and/or modify it under
4 # the terms of the GNU Affero General Public License as published by the Free
5 # Software Foundation, either version 3 of the License, or (at your option) any
6 # later version.
7 #
8 # This program is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
11 # details.
12 #
13 # You should have received a copy of the GNU Affero General Public License along
14 # with this program. If not, see <http://www.gnu.org/licenses/>.
15  
16 =encoding utf8
17  
18 =head1 NAME
19  
20 Game::TextMapper::Constants - width and height for map tiles
21  
22 =head1 SYNOPSIS
23  
24 use Game::TextMapper::Constants qw($dx $dy);
25  
26 =head1 DESCRIPTION
27  
28 This class defines C<$dx> (100) and C<$dy> (100×√3), the two important lengths
29 for hex tiles (used in the SVG output).
30  
31 =cut
32  
33 package Game::TextMapper::Constants;
34 11 require Exporter;
35 11 our @ISA = qw(Exporter);
36 11 our @EXPORT_OK = qw($dx $dy);
37  
38 11 our $dx = 100;
39 11 our $dy = 100*sqrt(3);
40  
41 11 1;
« blib/lib/Game/TextMapper/Mapper/Hex.pm ↑ Summary