Changeset 3798

Show
Ignore:
Timestamp:
12/30/07 10:37:38 (5 years ago)
Author:
junichiro
Message:

lang/perl/Games-Go: Change method name. 'display' -> 'show'

Location:
lang/perl/Games-Go/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Games-Go/trunk/bin/demo_play.pl

    r3770 r3798  
    99$go->hit([3,3]); 
    1010$go->hit([3,4]); 
    11 $go->display; 
     11$go->show; 
    1212 
    1313exit; 
  • lang/perl/Games-Go/trunk/lib/Games/Go/Play.pm

    r3771 r3798  
    77use Data::Dumper; 
    88# use Games::Go::Coordinate; 
     9use version; our $VERSION = qv('0.0.1'); 
    910 
    10 our $VERSION = '0.0.1'; 
     11use base qw/Class::Accessor::Fast/; 
     12__PACKAGE__->mk_accessors(qw(space black white out)); 
     13 
    1114our $B_SIZE = 19; 
    1215our $SPACE  = '0'; 
     
    4750} 
    4851 
    49 sub display { 
     52sub show { 
    5053    my ($self) = @_; 
    5154    my $symbol = { 
     
    8386} 
    8487 
    85 sub white { return $WHITE; } 
    86 sub black { return $BLACK; } 
    87 sub space { return $SPACE; } 
    88 sub out   { return $OUT; } 
    89  
    90881; 
    9189__END__ 
     
    9391=head1 NAME 
    9492 
    95 Games::Go::Play - [One line description of module's purpose here] 
     93Games::Go::Play - Play 'go' on Perl. 
    9694 
    9795 
     
    104102 
    105103    use Games::Go::Play; 
     104    my $go = Games::Go::Play->new('19'); 
     105    $go->hit([2,3]); 
     106    $go->hit([3,3]); 
     107    $go->hit([3,4]); 
     108    $go->show; 
    106109 
    107 =for author to fill in: 
    108     Brief code example(s) here showing commonest usage(s). 
    109     This section will be as far as many users bother reading 
    110     so make it as educational and exeplary as possible. 
    111    
    112    
    113110=head1 DESCRIPTION 
    114111 
    115 =for author to fill in: 
    116     Write a full description of the module and its features here. 
    117     Use subsections (=head2, =head3) as appropriate. 
     112This module make you to be able to play 'go' on perl. 
    118113 
     114#        
    119115 
    120 =head1 INTERFACE  
    121  
    122 =for author to fill in: 
    123     Write a separate section listing the public components of the modules 
    124     interface. These normally consist of either subroutines that may be 
    125     exported, or methods that may be called on objects belonging to the 
    126     classes provided by the module. 
    127  
    128  
    129 =head1 DIAGNOSTICS 
    130  
    131 =for author to fill in: 
    132     List every single error and warning message that the module can 
    133     generate (even the ones that will "never happen"), with a full 
    134     explanation of each problem, one or more likely causes, and any 
    135     suggested remedies. 
    136  
     116=head2 Methods 
    137117=over 
    138  
    139 =item C<< Error message here, perhaps with %s placeholders >> 
    140  
    141 [Description of error here] 
    142  
    143 =item C<< Another error message here >> 
    144  
    145 [Description of error here] 
    146  
    147 [Et cetera, et cetera] 
    148  
     118=item new 
     119new Constructor of play field(board). 
     120=item init 
     121Initialize play field(board). 
     122=item hit 
     123Do one action(itte utu). 
     124=item other_side 
     125return next player. 
     126=item show 
     127Show play field. 
    149128=back 
    150  
    151  
    152 =head1 CONFIGURATION AND ENVIRONMENT 
    153  
    154 =for author to fill in: 
    155     A full explanation of any configuration system(s) used by the 
    156     module, including the names and locations of any configuration 
    157     files, and the meaning of any environment variables or properties 
    158     that can be set. These descriptions must also include details of any 
    159     configuration language used. 
    160    
    161 Games::Go::Play requires no configuration files or environment variables. 
    162  
    163  
    164 =head1 DEPENDENCIES 
    165  
    166 =for author to fill in: 
    167     A list of all the other modules that this module relies upon, 
    168     including any restrictions on versions, and an indication whether 
    169     the module is part of the standard Perl distribution, part of the 
    170     module's distribution, or must be installed separately. ] 
    171  
    172 None. 
    173  
    174  
    175 =head1 INCOMPATIBILITIES 
    176  
    177 =for author to fill in: 
    178     A list of any modules that this module cannot be used in conjunction 
    179     with. This may be due to name conflicts in the interface, or 
    180     competition for system or program resources, or due to internal 
    181     limitations of Perl (for example, many modules that use source code 
    182     filters are mutually incompatible). 
    183  
    184 None reported. 
    185  
    186  
    187 =head1 BUGS AND LIMITATIONS 
    188  
    189 =for author to fill in: 
    190     A list of known problems with the module, together with some 
    191     indication Whether they are likely to be fixed in an upcoming 
    192     release. Also a list of restrictions on the features the module 
    193     does provide: data types that cannot be handled, performance issues 
    194     and the circumstances in which they may arise, practical 
    195     limitations on the size of data sets, special cases that are not 
    196     (yet) handled, etc. 
    197  
    198 No bugs have been reported. 
    199  
    200 Please report any bugs or feature requests to 
    201 C<bug-games-go-play@rt.cpan.org>, or through the web interface at 
    202 L<http://rt.cpan.org>. 
    203  
    204129 
    205130=head1 AUTHOR 
     
    214139This module is free software; you can redistribute it and/or 
    215140modify it under the same terms as Perl itself. See L<perlartistic>. 
    216  
    217  
    218 =head1 DISCLAIMER OF WARRANTY 
    219  
    220 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 
    221 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 
    222 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 
    223 PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
    224 EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
    225 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE 
    226 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH 
    227 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL 
    228 NECESSARY SERVICING, REPAIR, OR CORRECTION. 
    229  
    230 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 
    231 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 
    232 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE 
    233 LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, 
    234 OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE 
    235 THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 
    236 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 
    237 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 
    238 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 
    239 SUCH DAMAGES.