GithubHelp home page GithubHelp logo

catan-board's Introduction

This program randomly sets up the board game Settlers of Catan.
The Settlers of Catan board is composed of hexagonal tiles.
There are 19 tiles.
18 tiles have a roll and a resource. One tile is resourceless and lacks a roll
There are harbors that border the outside of certain tiles.
Each tile has a number that represents its location. 
This mapping between location number  and tiles is shown in "catan overview.odg"

For more information about the board game visit http://www.catan.com/game/settlers-catan and http://boardgamegeek.com/boardgame/13/the-settlers-of-catan

This program uses a class to represent a board layout. 
This class can be used by other programs related to Catan.
If you want to use this program as a stand-alone, run it from irb. 

A board is represented by an array of arrays.
Each mini-array represents a tile.
Example: [[tile_location, roll_value, resource],...,[tile_location19, roll_value19, resource19]

The harbors are contained separately in a one-dimensional array. 
The location of a harbor is determined by its position in the array.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.