bool JeCestaVPravo() { AngryBird.Otoc(Do.Prava); var jeTamCesta = MuzeVpred(); AngryBird.Otoc(Do.Leva); return(jeTamCesta); }
public void PoSpusteni() { while (HraciPlocha.NaPolickuPod(AngryBird) != TypPolicka.Prase) { if (MuzeVpred()) { AngryBird.PosunoutVpred(); } else { if (JeCestaVPravo()) { AngryBird.Otoc(Do.Prava); } else { AngryBird.Otoc(Do.Leva); } } } }