Catan Game Project

Project Overview

This project is a C++ implementation of the popular board game "Catan." The game simulates the original gameplay, including features such as building settlements, roads, cities, and managing development cards.

About Catan

Catan (formerly The Settlers of Catan) is a multiplayer board game designed by Klaus Teuber. Players are settlers, each attempting to build and develop holdings while trading and acquiring resources.

Game Basics

  • Players: 3-4 players
  • Game Duration: 60-120 minutes
  • Age Range: 10 years and up

Gameplay Overview

  1. Setup: Build the game board using hexagonal tiles representing different land types, each producing a specific resource.
  2. Resources: Collect resource cards based on dice rolls and the position of settlements and cities.
  3. Building: Use resources to build roads, settlements, cities, and buy development cards.
  4. Trading: Trade resources with other players and the bank.
  5. Development Cards: Use special cards for advantages like moving the robber or gaining resources.
  6. Victory Points: First player to reach 10 victory points wins.

Key Implementation Elements

  • Resource Management
  • Building Mechanics
  • Trade System
  • Development Cards
  • Robber Mechanics
  • Victory Condition Checking

Features

  • Game Elements (settlements, roads, cities, development cards)
  • Player Management
  • Game Board Implementation
  • Comprehensive Game Logic
  • Unit Tests

File Structure

ex3CPP_project/ │ ├── ex3CPP/ │ ├── Board.cpp │ ├── Board.hpp │ ├── Building.cpp │ ├── Building.hpp │ ├── City.cpp │ ├── City.hpp │ ├── DevelopmentCard.cpp │ ├── DevelopmentCard.hpp │ ├── Katan.cpp │ ├── Katan.hpp │ ├── KnightCard.cpp │ ├── KnightCard.hpp │ ├── main.cpp │ ├── makefile │ ├── MonopolyCard.cpp │ ├── MonopolyCard.hpp │ ├── Path.cpp │ ├── Path.hpp │ ├── Player.cpp │ ├── Player.hpp │ ├── Road.cpp │ ├── Road.hpp │ ├── RoadBuildingCard.cpp │ ├── RoadBuildingCard.hpp │ ├── Settlement.cpp │ ├── Settlement.hpp │ ├── test.cpp │ ├── Tile.cpp │ ├── Tile.hpp │ ├── Vertex.cpp │ ├── Vertex.hpp │ ├── VictoryPointCard.cpp │ ├── VictoryPointCard.hpp │ ├── YearOfPlentyCard.cpp │ ├── YearOfPlentyCard.hpp │ └── .vscode/ │ ├── c_cpp_properties.json │ └── settings.json

Compilation and Execution

  1. Prerequisites: C++ compiler (e.g., g++) and make utility.

  2. Build the Project: make

  3. Run the Game: ./katan

Unit Tests

Run tests with: make test ./test

Development Environment

  • VS Code configuration files included in .vscode/ directory.
  • Configure your IDE to use these settings for optimal development experience.