NAME
Settlers::Game - a class for managing games of Settlers
VERSION
version 0.07
SYNOPSIS
use Settlers::Game;
open my $log_fh, '>>', \my $log;
my $game = Settlers::Game->new({log => $log_fh});
# add 4 players
$game->event('PA', {});
$game->event('PA', {});
$game->event('PA', {});
$game->event('PA', {});
# use the starter map
$game->starter_map;
# end setup, start deployment phase
$game->event('PE', {});
# log of Settlers-Game-Notation
print $log;
DESCRIPTION
Settlers::Game
is a class for managing games of Settlers. It implements v0.01 of Settlers-Game-Notation, albeit the data structures should be decoded into Perl from JSON before calling action
(see #SYNOPSIS). You should read and understand the Settlers-Game-Notation docs before using this class. Have a look at the test script t/game.t which runs through a complete game of Settlers using this class.
INSTALLATION
You can install using cpanm:
$ git clone https://github.com/dnmfarrell/Settlers-Game.git
$ cd Settlers-Game
$ cpanm ./
AUTHOR
David Farrell <dfarrell@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by David Farrell.
This is free software, licensed under:
The (two-clause) FreeBSD License