C# Class AIsOfCatan.Board

Inheritance: IBoard
Mostrar archivo Open project: rasmusgreve/catan

Public Methods

Method Description
Board ( int terrainSeed ) : System
Board ( int terrainSeed, int numberSeed ) : System
CanBuildPiece ( Intersection intersection ) : bool
CanBuildRoad ( Edge edge ) : bool
GetAdjacentEdges ( Intersection intersection ) : Edge[]
GetAdjacentEdges ( int tileIndex ) : Edge[]
GetAdjacentIntersections ( Edge edge ) : AIsOfCatan.API.Intersection[]
GetAdjacentIntersections ( int tileIndex ) : AIsOfCatan.API.Intersection[]
GetAdjacentTiles ( int index ) : List
GetAllEdges ( ) : Edge[]
GetAllIntersections ( ) : AIsOfCatan.API.Intersection[]
GetAllPieces ( ) : Piece>.Dictionary
GetAllRoads ( ) : int>.Dictionary
GetHarbors ( ) : AIsOfCatan.API.Harbor[]
GetLongestRoad ( ) : int>.Dictionary
GetPiece ( Intersection intersection ) : Piece
GetPieces ( int index ) : AIsOfCatan.API.Piece[]
GetPlayersHarbors ( int playerID ) : HarborType[]
GetPlayersLongestRoad ( int playerID ) : int
GetPossibleCities ( int playerID ) : AIsOfCatan.API.Intersection[]
GetPossibleRoads ( int playerID ) : Edge[]
GetPossibleSettlements ( int playerID ) : AIsOfCatan.API.Intersection[]
GetRoad ( Edge edge ) : int
GetRobberLocation ( ) : int
GetRowLength ( int row ) : int
GetTile ( int index ) : Tile
GetTile ( int row, int column ) : Tile
HasNoNeighbors ( Intersection intersection ) : bool
MoveRobber ( int index ) : IBoard
PlacePiece ( Intersection intersection, Piece p ) : IBoard
PlaceRoad ( Edge edge, int playerID ) : IBoard
ToString ( ) : string

Private Methods

Method Description
AddPiece ( List list, Intersection intersection ) : void
Board ( ) : System
Board ( Tile terrain, int>.Dictionary roads, Piece>.Dictionary settlements, int robber, Harbor harbors, Intersection inter, Edge edges ) : System
CountRoadLengthFromIntersection ( int playerID, Intersection curInt, HashSet visited, HashSet globalVisited ) : int
GetTerrainCoords ( int index ) : int>.Tuple
GetTerrainIndex ( int row, int col ) : int
InitTerrain ( int terrainSeed, int numberSeed, bool randomNumbers ) : void
IsLegalEdge ( Edge edge ) : System.Boolean

Method Details

Board() public method

public Board ( int terrainSeed ) : System
terrainSeed int
return System

Board() public method

public Board ( int terrainSeed, int numberSeed ) : System
terrainSeed int
numberSeed int
return System

CanBuildPiece() public method

public CanBuildPiece ( Intersection intersection ) : bool
intersection AIsOfCatan.API.Intersection
return bool

CanBuildRoad() public method

public CanBuildRoad ( Edge edge ) : bool
edge Edge
return bool

GetAdjacentEdges() public method

public GetAdjacentEdges ( Intersection intersection ) : Edge[]
intersection AIsOfCatan.API.Intersection
return Edge[]

GetAdjacentEdges() public method

public GetAdjacentEdges ( int tileIndex ) : Edge[]
tileIndex int
return Edge[]

GetAdjacentIntersections() public method

public GetAdjacentIntersections ( Edge edge ) : AIsOfCatan.API.Intersection[]
edge Edge
return AIsOfCatan.API.Intersection[]

GetAdjacentIntersections() public method

public GetAdjacentIntersections ( int tileIndex ) : AIsOfCatan.API.Intersection[]
tileIndex int
return AIsOfCatan.API.Intersection[]

GetAdjacentTiles() public method

public GetAdjacentTiles ( int index ) : List
index int
return List

GetAllEdges() public method

public GetAllEdges ( ) : Edge[]
return Edge[]

GetAllIntersections() public method

public GetAllIntersections ( ) : AIsOfCatan.API.Intersection[]
return AIsOfCatan.API.Intersection[]

GetAllPieces() public method

public GetAllPieces ( ) : Piece>.Dictionary
return Piece>.Dictionary

GetAllRoads() public method

public GetAllRoads ( ) : int>.Dictionary
return int>.Dictionary

GetHarbors() public method

public GetHarbors ( ) : AIsOfCatan.API.Harbor[]
return AIsOfCatan.API.Harbor[]

GetLongestRoad() public method

public GetLongestRoad ( ) : int>.Dictionary
return int>.Dictionary

GetPiece() public method

public GetPiece ( Intersection intersection ) : Piece
intersection AIsOfCatan.API.Intersection
return AIsOfCatan.API.Piece

GetPieces() public method

public GetPieces ( int index ) : AIsOfCatan.API.Piece[]
index int
return AIsOfCatan.API.Piece[]

GetPlayersHarbors() public method

public GetPlayersHarbors ( int playerID ) : HarborType[]
playerID int
return HarborType[]

GetPlayersLongestRoad() public method

public GetPlayersLongestRoad ( int playerID ) : int
playerID int
return int

GetPossibleCities() public method

public GetPossibleCities ( int playerID ) : AIsOfCatan.API.Intersection[]
playerID int
return AIsOfCatan.API.Intersection[]

GetPossibleRoads() public method

public GetPossibleRoads ( int playerID ) : Edge[]
playerID int
return Edge[]

GetPossibleSettlements() public method

public GetPossibleSettlements ( int playerID ) : AIsOfCatan.API.Intersection[]
playerID int
return AIsOfCatan.API.Intersection[]

GetRoad() public method

public GetRoad ( Edge edge ) : int
edge Edge
return int

GetRobberLocation() public method

public GetRobberLocation ( ) : int
return int

GetRowLength() public static method

public static GetRowLength ( int row ) : int
row int
return int

GetTile() public method

public GetTile ( int index ) : Tile
index int
return AIsOfCatan.API.Tile

GetTile() public method

public GetTile ( int row, int column ) : Tile
row int
column int
return AIsOfCatan.API.Tile

HasNoNeighbors() public method

public HasNoNeighbors ( Intersection intersection ) : bool
intersection AIsOfCatan.API.Intersection
return bool

MoveRobber() public method

public MoveRobber ( int index ) : IBoard
index int
return IBoard

PlacePiece() public method

public PlacePiece ( Intersection intersection, Piece p ) : IBoard
intersection AIsOfCatan.API.Intersection
p AIsOfCatan.API.Piece
return IBoard

PlaceRoad() public method

public PlaceRoad ( Edge edge, int playerID ) : IBoard
edge Edge
playerID int
return IBoard

ToString() public method

public ToString ( ) : string
return string