C# Class AIsOfCatan.StarterAgent

Inheritance: IAgent
Afficher le fichier Open project: rasmusgreve/catan

Méthodes publiques

Méthode Description
BeforeDiceRoll ( IGameState state, IGameActions actions ) : void
ChoosePlayerToDrawFrom ( IGameState state, int validOpponents ) : int
DiscardCards ( IGameState state, int toDiscard ) : Resource[]
GetDescription ( ) : string
GetName ( ) : string
HandleTrade ( IGameState state, ITrade offer, int proposingPlayerId ) : ITrade
MoveRobber ( IGameState state ) : int
PerformTurn ( IGameState state, IGameActions actions ) : void
PlaceStart ( IGameState state, IStartActions actions ) : void
Reset ( int assignedId ) : void

Private Methods

Méthode Description
Chances ( int roll ) : int
DifferentTypes ( Intersection inter, IBoard board ) : int
FindBestIntersection ( IEnumerable enumerable, IBoard board ) : Intersection
FindBestRoad ( IEnumerable edges, IBoard board ) : Edge
FindBestRoad ( Intersection from, IBoard board ) : Edge
GetEdgeBetween ( Intersection first, Intersection second ) : Edge
GetEnds ( Intersection inter, IBoard board ) : IEnumerable
GetScore ( Edge e, IBoard board ) : double
GetScore ( Intersection inter, IBoard board ) : int
OpponentTileValue ( int tile, IBoard board ) : int
OwnTileValue ( int tile, IBoard board ) : int

Method Details

BeforeDiceRoll() public méthode

public BeforeDiceRoll ( IGameState state, IGameActions actions ) : void
state IGameState
actions IGameActions
Résultat void

ChoosePlayerToDrawFrom() public méthode

public ChoosePlayerToDrawFrom ( IGameState state, int validOpponents ) : int
state IGameState
validOpponents int
Résultat int

DiscardCards() public méthode

public DiscardCards ( IGameState state, int toDiscard ) : Resource[]
state IGameState
toDiscard int
Résultat Resource[]

GetDescription() public méthode

public GetDescription ( ) : string
Résultat string

GetName() public méthode

public GetName ( ) : string
Résultat string

HandleTrade() public méthode

public HandleTrade ( IGameState state, ITrade offer, int proposingPlayerId ) : ITrade
state IGameState
offer ITrade
proposingPlayerId int
Résultat ITrade

MoveRobber() public méthode

public MoveRobber ( IGameState state ) : int
state IGameState
Résultat int

PerformTurn() public méthode

public PerformTurn ( IGameState state, IGameActions actions ) : void
state IGameState
actions IGameActions
Résultat void

PlaceStart() public méthode

public PlaceStart ( IGameState state, IStartActions actions ) : void
state IGameState
actions IStartActions
Résultat void

Reset() public méthode

public Reset ( int assignedId ) : void
assignedId int
Résultat void