| 1 | # | ||
| 2 | # This file is part of Games-RailRoad | ||
| 3 | # | ||
| 4 | # This software is copyright (c) 2008 by Jerome Quelin. | ||
| 5 | # | ||
| 6 | # This is free software; you can redistribute it and/or modify it under | ||
| 7 | # the same terms as the Perl 5 programming language system itself. | ||
| 8 | # | ||
| 9 | 1 | ▶ | use 5.010; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | package Games::RailRoad::Node::Straight::NW_SE; | ||
| 14 | 1 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 1 | $Games::RailRoad::Node::Straight::NW_SE::VERSION = '1.101330'; | |
| 16 | } | ||
| 17 | # ABSTRACT: a given type of node... | ||
| 18 | |||
| 19 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | 1 | extends qw{ Games::RailRoad::Node::Straight }; | |
| 21 | |||
| 22 | |||
| 23 | # -- private methods | ||
| 24 | |||
| 25 | 0 | ▶ | sub _next_map { |
|
Subroutine
_next_map: not called CC=1 SCAR=6.9
| |||
| 26 | return { | ||
| 27 | 0 | 'nw' => 'se', | |
| 28 | 'se' => 'nw', | ||
| 29 | }; | ||
| 30 | } | ||
| 31 | |||
| 32 | |||
| 33 | 0 | ▶ | sub _transform_map { |
|
Subroutine
_transform_map: not called CC=1 SCAR=6.9
| |||
| 34 | 0 | my $prefix = 'Games::RailRoad::Node::'; | |
| 35 | return { | ||
| 36 | 0 | 'e' => $prefix . 'Switch::E_NW_SE', | |
| 37 | 'n' => $prefix . 'Switch::N_NW_SE', | ||
| 38 | 's' => $prefix . 'Switch::NW_S_SE', | ||
| 39 | 'w' => $prefix . 'Switch::NW_SE_W', | ||
| 40 | '-nw' => $prefix . 'Half::SE', | ||
| 41 | '-se' => $prefix . 'Half::NW', | ||
| 42 | }; | ||
| 43 | } | ||
| 44 | |||
| 45 | 1 | __PACKAGE__->meta->make_immutable; | |
| 46 | 1 | 1; | |
| 47 | |||
| 48 | |||
| 49 | =pod | ||
| 50 | |||
| 51 | =head1 NAME | ||
| 52 | |||
| 53 | Games::RailRoad::Node::Straight::NW_SE - a given type of node... | ||
| 54 | |||
| 55 | =head1 VERSION | ||
| 56 | |||
| 57 | version 1.101330 | ||
| 58 | |||
| 59 | =head1 DESCRIPTION | ||
| 60 | |||
| 61 | This package provides a node object. Refer to L<Games::RailRoad::Node> | ||
| 62 | for a description of the various node types. | ||
| 63 | |||
| 64 | =head1 AUTHOR | ||
| 65 | |||
| 66 | Jerome Quelin | ||
| 67 | |||
| 68 | =head1 COPYRIGHT AND LICENSE | ||
| 69 | |||
| 70 | This software is copyright (c) 2008 by Jerome Quelin. | ||
| 71 | |||
| 72 | This is free software; you can redistribute it and/or modify it under | ||
| 73 | the same terms as the Perl 5 programming language system itself. | ||
| 74 | |||
| 75 | =cut | ||
| 76 | |||
| 77 | |||
| 78 | __END__ | ||