NAME

Catan::Game - a class for managing games of Catan

VERSION

version 0.02

SYNOPSIS

use Catan::Game;

open my $log_fh, '>>', \my $log;
my $game = Catan::Game->new({log => $log_fh});

# add 4 players
$game->action('PA', {});
$game->action('PA', {});
$game->action('PA', {});
$game->action('PA', {});

# use the starter map
$game->starter_map;

# end setup, start deployment phase
$game->action('PE', {});

# log of Catan-Game-Notation
print $log;

DESCRIPTION

Catan::Game is a class for managing games of Catan. It implements v0.01 of Catan-Game-Notation, albeit the data structures should be decoded into Perl from JSON before calling action (see #SYNOPSIS). You should read and understand the Catan-Game-Notation docs before using this class. Have a look at the test script t/game.t which runs through a complete game of Catan using this class.

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