C# 클래스 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.
파일 보기 프로젝트 열기: dankrusi/life-simulation-challenge 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
spawnInitialLifelets ( ) : void

메소드 상세

CreateLifelet() 공개 메소드

public CreateLifelet ( int x, int y ) : void
x int
y int
리턴 void

DoEnergyTransaction() 공개 메소드

public DoEnergyTransaction ( ) : void
리턴 void

Draw() 공개 메소드

public Draw ( Graphics g ) : void
g System.Drawing.Graphics
리턴 void

GetAvailableRaces() 공개 정적인 메소드

public static GetAvailableRaces ( ) : ArrayList
리턴 System.Collections.ArrayList

RemoveLifelet() 공개 메소드

public RemoveLifelet ( Lifelet life ) : void
life Lifelet
리턴 void

Reset() 공개 메소드

public Reset ( ) : void
리턴 void

SetCursor() 공개 메소드

public SetCursor ( int x, int y ) : void
x int
y int
리턴 void

Simulate() 공개 메소드

public Simulate ( ) : void
리턴 void

UnshellLifelet() 공개 메소드

public UnshellLifelet ( ShelledLifelet shelled ) : Lifelet
shelled ShelledLifelet
리턴 Lifelet

World() 공개 메소드

public World ( ArrayList races, int initialLifelets, SpawnMethod spawnMethod ) : System
races System.Collections.ArrayList
initialLifelets int
spawnMethod SpawnMethod
리턴 System

getAvailableRacesFromFolder() 공개 정적인 메소드

public static getAvailableRacesFromFolder ( string folder ) : ArrayList
folder string
리턴 System.Collections.ArrayList