C# Class Sim, plausible-deniability

Afficher le fichier Open project: ad510/plausible-deniability Class Usage Examples

Méthodes publiques

Свойство Type Description
alternatePaths List
lastUnseenTile FP.Vector
networkView NetworkView
tiles ].Tile[
users User[],

Méthodes publiques

Méthode Description
addStackEvts ( List stackPaths, int nSeeUnits ) : void

adds events to stack specified paths as they arrive

deleteOtherPaths ( IEnumerable segmentUnits, bool addDeleteLines, bool addKeepLines ) : bool

removes units from all other paths that, if seen, could cause specified units to be removed from specified segments; returns whether successful

inVis ( long tX, long tY ) : bool

returns if a hypothetical unit at the origin could see tile with specified (positive or negative) x and y indices

playerNamed ( string name ) : Player,
resourceNamed ( string name ) : int
segmentUnitsWhen ( IEnumerable segmentUnits, long time ) : IEnumerable

iterates over all SegmentUnits active at specified time that are past, present, or future versions of specified SegmentUnits

segmentsWhen ( long time ) : IEnumerable
tileAt ( FP pos ) : Tile,
tileLen ( ) : int
tileVisRadius ( ) : int
unitTypeNamed ( string name ) : UnitType,
unitsCanMake ( List parentUnits, UnitType, type ) : bool
update ( long curTime ) : void

master update method which updates the live game simulation to the specified time

this doesn't update time traveling units, must call updatePast() separately for each player

Private Methods

Méthode Description
addAncestors ( SegmentUnit, segmentUnit, HashSet ancestors, HashSet prev, HashSet liveToNonLivePrev ) : void
afterDeserialize ( ) : void
afterSerialize ( ) : void
beforeSerialize ( ) : void

Method Details

addStackEvts() public méthode

adds events to stack specified paths as they arrive
public addStackEvts ( List stackPaths, int nSeeUnits ) : void
stackPaths List
nSeeUnits int
Résultat void

deleteOtherPaths() public méthode

removes units from all other paths that, if seen, could cause specified units to be removed from specified segments; returns whether successful
public deleteOtherPaths ( IEnumerable segmentUnits, bool addDeleteLines, bool addKeepLines ) : bool
segmentUnits IEnumerable
addDeleteLines bool
addKeepLines bool
Résultat bool

inVis() public méthode

returns if a hypothetical unit at the origin could see tile with specified (positive or negative) x and y indices
public inVis ( long tX, long tY ) : bool
tX long
tY long
Résultat bool

playerNamed() public méthode

public playerNamed ( string name ) : Player,
name string
Résultat Player,

resourceNamed() public méthode

public resourceNamed ( string name ) : int
name string
Résultat int

segmentUnitsWhen() public méthode

iterates over all SegmentUnits active at specified time that are past, present, or future versions of specified SegmentUnits
public segmentUnitsWhen ( IEnumerable segmentUnits, long time ) : IEnumerable
segmentUnits IEnumerable
time long
Résultat IEnumerable

segmentsWhen() public méthode

public segmentsWhen ( long time ) : IEnumerable
time long
Résultat IEnumerable

tileAt() public méthode

public tileAt ( FP pos ) : Tile,
pos FP
Résultat Tile,

tileLen() public méthode

public tileLen ( ) : int
Résultat int

tileVisRadius() public méthode

public tileVisRadius ( ) : int
Résultat int

unitTypeNamed() public méthode

public unitTypeNamed ( string name ) : UnitType,
name string
Résultat UnitType,

unitsCanMake() public méthode

public unitsCanMake ( List parentUnits, UnitType, type ) : bool
parentUnits List
type UnitType,
Résultat bool

update() public méthode

master update method which updates the live game simulation to the specified time
this doesn't update time traveling units, must call updatePast() separately for each player
public update ( long curTime ) : void
curTime long
Résultat void

Property Details

alternatePaths public_oe property

public List alternatePaths
Résultat List

lastUnseenTile public_oe property

public FP.Vector lastUnseenTile
Résultat FP.Vector

networkView public_oe property

public NetworkView networkView
Résultat NetworkView

tiles public_oe property

public Tile[,] tiles
Résultat ].Tile[

users public_oe property

public User[], users
Résultat User[],