ako upraviť program, aby sa agent pohyboval v každom
cykle iba o jeden krok ?
for (AgentA a : aa)
{ a.orientacia=a.changeorientacia();
a.move();
}
void move()
{
int pom;
pom=getorientacia();
if (pom==0) polohax=polohax+1;
if (pom==1) polohax=polohax-1;
if (pom==2) polohay=polohay+1;
if (pom==3) polohay=polohay-1;
}
TIP: Přetáhni ikonu na hlavní panel pro připnutí webu



Nahlásit jako SPAM
IP: 176.112.191.–
Duch
Zjistit počet nových příspěvků
































