Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.08 KB

README.md

File metadata and controls

29 lines (18 loc) · 1.08 KB

Games::Catan

Games::Catan is a suite of Perl libraries that simulate the popular board game Settlers of Catan. A game can be constructed and played by very primitive AI players by doing:

use Games::Catan;

my $catan = Games::Catan->new( num_players => 4 );
$catan->play();

Game Board

The game board is constructed by utilizing a undirected graph data structure, which consists of vertices (intersections) and edges (paths) between them. The Graph Perl module is used internally. This graph can be visualized as follows:

catan undirected graph

Only a standard 3-4 player game board is currently supported. This consists of 54 total intersections, with 72 total edges between them, yielding 19 total tiles. The tiles are indexed as follows:

catan tiles

Tiles themselves are not an additional data structure, but simply a collection of intersections and edges.

Copyright

Settlers of Catan is © Catan GmbH 2015 (http://www.catan.com)