# Siedler of Catan 
Siedler of Catan is a multi-player-roleplay game, that lets you create settlements, 
build roads and upgrade settlements to cites in the world of catan.
You have to try to get the required amount of winpoints as fast as possible to come out as the winner.
You collect winpoints by owning settlements and cities and even get an extra two for owning the longest road.
It is also a strategic game, so you will have to choose wisely where to place your Structures.

#Rules
1. The minimum Player amount is 2 and the maximum Player amount is 4.
2. The minimum amount if win points is 3.
3. Each Player can build two roads and two settlements free of cost at the beginning of
the game. After placing the second settlement the players will each  receive the resources from around the second settlement.
4. Every Player receives a faction. There cannot be two players in the
same faction.
5. A player cannot build two settlements or cities right next one another. 
There have to be at least two roads between them.
6. The cost for each structure is set and is nonnegotiable.
7. The player with the longest road (most roads connecting to one another), which is longer than 4
will be awarded two additional winpoints.
8. If a player rolls a 7 on a dice throw, all player that are holding more than 7 resources, 
will lose half of all their resources. The resources that are being taken are chosen
by random.

For a more detailed version of the rules please look here: https://www.catan.de/sites/prod/files/2021-06/CATAN_DasSpiel_Spielregel.pdf

#Usermanual
Setup Phase:
1. Enter the number of players that will be playing. (min 2, max 4)
2. Enter the number of winpoints needed to win the game. (min 3)
3. Each player is given a faction it is your as soon as the console says it is your faction's turn.
4. Every Faction will receive the possibility to place a settlement with a corresponding road. (no resource cost)
5. Play order is reversed and every faction receives a second settlement and a road to place. (no resource cost)
Each faction will afterwards receive the resources surrounding the second settlement.

After the setup phase the game phase will begin and continue until a winner emerges or the game gets quit via the quit command.

Navigate in the Game Phase:

>It is your turn as soon as the console shows it is your turn.

>To execute an action type in the associated number of the command, which is showed in the terminal. 
Same applies when asked about resources.


#Avaible Commands:
>``next player`` Ends a players turn and the next player turn will be started

When the current player has done all the building and trading they wanted and now
want to end their turn they can end it by entering the command next player. By choosing
the command the player finishes their turn and the next player is at turn




>``build settlement`` Builds a settlement at the chosen location.

When it's the players turn, they can build a new settlement by giving the command
build settlement. With that they will be asked where they want to build said settlement
and to enter the coordinates, then the program will check if those coordinates are available or not. Then the 
program will subtract the resources needed to build a settlement. If the player has 
insufficient resources the settlement will not be built and an error message will 
appear. The turn of the current player will continue until the player ends it.


>``build city`` Builds a city at the chosen location.

During the players turn they can build a city on the same coordinates that they 
have already built a settlement on. To do that they have to enter the command 
build city. Then they have to add the coordinates that they want the city to be 
built at. If the coordinates are available and the settlement at that coordinate is 
of the same faction as the player then the city can be built there. The program 
will then check if the player has sufficient resources to build the city, then 
the program will subtract them of the players resources, otherwise the city won't 
be build and the player continues their turn until they end it. 


>``build road`` Builds a road at chosen location.

During the current players turn, the player can build a new road by choosing the
command build road. The player will be asked to give the coordinates of the start corner and the end corner for where
they want to build the new road after entering the coordinates the program will 
check to see if they are valid coordinates and if they aren't occupied. 
If the coordinates are checked and there was no error message, then the program 
will check if the player has enough resources to build the road if they do the 
program will then subtract the amount of resources of the player. If they do not 
have enough resources the road will not be built and the player will receive 
an error message. The player continues their turn until they end it.

>``trade with bank`` Starts the trade with the bank 

The current player can trade resources with the bank by entering the command 
trade with bank. The player then can enter what and how many resources they want 
then they have to enter what resources they will give in return. The trade course 
for the resources is set to 1:4. That means the player will have to give 4 resources 
trade for one of their choosing from the bank. If they do not have enough resources 
to give the trade will not be completed and the player may continue their turn.


>``quit`` Quits the game completely.

If a player wants to quit the game they can choose the command quit while it's their 
turn to quit the game. 

#Coordinates

![Coordinates](doc/Coordinates_SiedlerBoard.PNG)


#Class Diagram

![Class Diagramm](doc/ClassDiagramm.png)