C# Class AIsOfCatan.StartActions

Inheritance: IStartActions
Show file Open project: rasmusgreve/catan Class Usage Examples

Public Methods

Method Description
BuildRoad ( Edge edge ) : void

Build a road on the board If you try to build at a position not connected to the newly placed settlement an IllegalBuildPositionException is thrown If you try to build more than one road an IllegalActionException is thrown

BuildSettlement ( Intersection intersection ) : void

Build a settlement on the board If you try to build too close to another building a IllegalBuildPosition is thrown Must be called before BuildRoad, otherwise an IllegalActionException is thrown

GetRoadPosition ( ) : Edge

Internal method used for handing out resources

GetSettlementPosition ( ) : Intersection

Internal method used for handing out resources

IsComplete ( ) : bool

Returns whether the start action has been completed

StartActions ( Player player, GameController controller ) : System.Linq

Method Details

BuildRoad() public method

Build a road on the board If you try to build at a position not connected to the newly placed settlement an IllegalBuildPositionException is thrown If you try to build more than one road an IllegalActionException is thrown
public BuildRoad ( Edge edge ) : void
edge AIsOfCatan.API.Edge
return void

BuildSettlement() public method

Build a settlement on the board If you try to build too close to another building a IllegalBuildPosition is thrown Must be called before BuildRoad, otherwise an IllegalActionException is thrown
public BuildSettlement ( Intersection intersection ) : void
intersection AIsOfCatan.API.Intersection
return void

GetRoadPosition() public method

Internal method used for handing out resources
public GetRoadPosition ( ) : Edge
return AIsOfCatan.API.Edge

GetSettlementPosition() public method

Internal method used for handing out resources
public GetSettlementPosition ( ) : Intersection
return AIsOfCatan.API.Intersection

IsComplete() public method

Returns whether the start action has been completed
public IsComplete ( ) : bool
return bool

StartActions() public method

public StartActions ( Player player, GameController controller ) : System.Linq
player Player
controller GameController
return System.Linq