#!perl

use 5.014;
use strict;
use warnings;

use Game::Fanorona::Terminal;

our $VERSION = '0.02';

exit Game::Fanorona::Terminal->run(@ARGV);

__END__

=head1 NAME

fanorona - the board game of Madagascar, in a terminal

=head1 SYNOPSIS

    fanorona
    fanorona --side black --level 5
    fanorona --side both --no-colour
    fanorona --variant telo
    fanorona --load saved.txt

=head1 DESCRIPTION

Plays fanorona against the program, between two people at one keyboard, or the
program against itself. See L<Game::Fanorona::Terminal> for how it is played
and L<Game::Fanorona> for the rules.

Given none of C<--side>, C<--level>, C<--variant> and C<--load>, and a terminal
whose keys it can read, it begins by asking for the three.

=head1 OPTIONS

=over 4

=item B<--side> I<who>

Which side is yours: C<white> (the default; White moves first), C<black>,
C<both> for two people at one keyboard, or C<neither> to watch.

=item B<--level> I<n>

1 to 5. 3 by default. Level 1 takes the most stones it can and looks no
further; each level above it looks at more positions before it moves.

=item B<--variant> I<name>

The board: C<sivy>, nine points by five and the game most people mean;
C<dimy>, five by five; or C<telo>, three by three. Anything
L<Game::Fanorona::Variant/from_string> reads is accepted.

=item B<--load> I<file>

Carry on with a game written by the C<save> command.

=item B<--no-colour>

Draw the board in letters and lines. C<--no-color> is the same, and so is
setting C<NO_COLOR> in the environment.

=item B<--no-pick>

Type moves instead of choosing them with the arrow keys.

=item B<--no-unicode>

Letters for the stones, keeping the colour.

=item B<--version>, B<--help>

Say so and stop.

=back

There is no C<--seed>: the game has no chance in it.

=head1 EXIT STATUS

0 when the game was left in the ordinary way, 2 when the options were wrong or
a file could not be loaded.

=head1 AUTHOR

LNATION <email@lnation.org>

=head1 LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by LNATION <email@lnation.org>.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)

=cut
