You're running your function twice for each iteration.
Try this (untested) :
Code:for(int i = 0; i < anzSchritte; i++){ if((nextStep(insectZeiger, laenge, raster)) == 3){ printf("Gecrasht bei %u",i); break; } }
You're running your function twice for each iteration.
Try this (untested) :
Code:for(int i = 0; i < anzSchritte; i++){ if((nextStep(insectZeiger, laenge, raster)) == 3){ printf("Gecrasht bei %u",i); break; } }
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss