nurikabe / nurikabe-solver / Games-Nurikabe-Solver / lib / Games / Nurikabe / Solver /

package Games::Nurikabe::Solver::Coords;

use strict;
use warnings;

use base 'Games::Nurikabe::Solver::Base';


=head1 NAME

Games::Nurikabe::Solver::Coords - an object representing a coordinates pair
in the Nurikabe board.

=head1 VERSION

Version 0.01


our $VERSION = '0.01';


    use Games::Nurikabe::Solver::Coords;

    my $coords = Games::Nurikabe::Solver::Coords->new({x => $x, y => $y);

    print "X = ", $coords->x();
    print "Y = ", $coords->y();

=head1 METHODS

=head2 ->new({y => $y, x => $x})

Creates a new object with $y and $x as coordinates.


sub _init
    my ($self, $args) = @_;



=head2 x()

Returns the column (or "x") coordinate.

=head2 y()

Returns the row (or "y") coordinate.

=head2 to_s()

Convert the coordinates to a string representation.


sub to_s
    my $self = shift;

    return $self->y() . ',' . $self->x();

=head2 [$y, $x] = $coords->to_aref()

Returns an array reference containing the y and x coordinates (in that order).


sub to_aref
    my ($self) = @_;

    return [$self->y(), $self->x()];


=head1 AUTHOR

Shlomi Fish, C<< <shlomif at> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-games-nurikabe-solver at>, or through
the web interface at L<>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Games::Nurikabe::Solver::Coords

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker


=item * AnnoCPAN: Annotated CPAN documentation


=item * CPAN Ratings


=item * Search CPAN


=item * Version control repository:





Copyright 2008 Shlomi Fish, all rights reserved.

This program is released under the following license: MIT/X11 Licence.


1; # End of Games::Nurikabe::Solver::Coords
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.