C# Class LifeSimulation.Core.World

The World class represents the world state in the simulation. It contains all the lifelets, food and messages. It also keeps track of statistics and is responsible for spawning all the lifelets.
Afficher le fichier Open project: dankrusi/life-simulation-challenge Class Usage Examples

Méthodes publiques

Méthode Description
CreateLifelet ( int x, int y ) : void
DoEnergyTransaction ( ) : void
Draw ( Graphics g ) : void
GetAvailableRaces ( ) : ArrayList
RemoveLifelet ( Lifelet life ) : void
Reset ( ) : void
SetCursor ( int x, int y ) : void
Simulate ( ) : void
UnshellLifelet ( ShelledLifelet shelled ) : Lifelet
World ( ArrayList races, int initialLifelets, SpawnMethod spawnMethod ) : System
getAvailableRacesFromFolder ( string folder ) : ArrayList

Private Methods

Méthode Description
spawnInitialLifelets ( ) : void

Method Details

CreateLifelet() public méthode

public CreateLifelet ( int x, int y ) : void
x int
y int
Résultat void

DoEnergyTransaction() public méthode

public DoEnergyTransaction ( ) : void
Résultat void

Draw() public méthode

public Draw ( Graphics g ) : void
g System.Drawing.Graphics
Résultat void

GetAvailableRaces() public static méthode

public static GetAvailableRaces ( ) : ArrayList
Résultat System.Collections.ArrayList

RemoveLifelet() public méthode

public RemoveLifelet ( Lifelet life ) : void
life Lifelet
Résultat void

Reset() public méthode

public Reset ( ) : void
Résultat void

SetCursor() public méthode

public SetCursor ( int x, int y ) : void
x int
y int
Résultat void

Simulate() public méthode

public Simulate ( ) : void
Résultat void

UnshellLifelet() public méthode

public UnshellLifelet ( ShelledLifelet shelled ) : Lifelet
shelled ShelledLifelet
Résultat Lifelet

World() public méthode

public World ( ArrayList races, int initialLifelets, SpawnMethod spawnMethod ) : System
races System.Collections.ArrayList
initialLifelets int
spawnMethod SpawnMethod
Résultat System

getAvailableRacesFromFolder() public static méthode

public static getAvailableRacesFromFolder ( string folder ) : ArrayList
folder string
Résultat System.Collections.ArrayList