有限状态机 联系客服

发布时间 : 星期日 文章有限状态机更新完毕开始阅读a85eb0a084254b35eefd34c7

type=theType; row=theRow; col=theCol; state=theState; }

// ----------------------------------------------------------------- // ai_World::ai_World()

// ----------------------------------------------------------------- // { int i; int j; for (i=0;i

//for (i=0;i

// ----------------------------------------------------------------- // ai_World::~ai_World()

// ----------------------------------------------------------------- // { }

// ----------------------------------------------------------------- // void ai_World::UpdateWorld(void)

// ----------------------------------------------------------------- // { int i; for (i=0;i

int main() {

int again;

do {

int terrain2[kMaxRows][kMaxCols]={0};

int row,col;

cout<<\is the blackground,and 1->Ground 2->Water 3->BlackHome 4->redhome 5->poision 6->food\

for(int i=1;i

for(int j=1;j

cout<

cout<<\ for(int i=0;i

if(entityList[i].state!=kDead)

row=entityList[i].row; col=entityList[i].col; terrain2[row][col]++; }

for(int f=1;f

for(int j=1;j

cout<

cout<<\ cin>>again;

MainWorld.UpdateWorld(); }

while(again==1); }