diff --git a/hDateien/rows.h b/hDateien/rows.h index b637cbbd08e5e6553212ef6f873294ae58615816..16a93a25304311bc6ff7000e6669c8ddda90235d 100644 --- a/hDateien/rows.h +++ b/hDateien/rows.h @@ -14,8 +14,6 @@ //Declaration of functions -int gen_stone(); - struct Row* race(int); struct Row* init_row(struct Row*); struct Row* grass(bool,bool,int); diff --git a/map.c b/map.c index d56f33407f20a2675d385e9db9e30af65c68debc..fa1a05034c2e6d630e5757af6203120c78cee4c7 100644 --- a/map.c +++ b/map.c @@ -136,6 +136,8 @@ int move_map(enum vehicle theme,int delta_y,struct LinkedList *list, SDL_Rendere player->y += ROW_SIZE; player->x -= ROW_SIZE; playerscore--; + }else{ + player->x += ROW_SIZE; } } } diff --git a/rows.c b/rows.c index a76856a3080916d7e4013e8bebd00301b1c05202..4867d2b39e8f481a30d36a5b80dca6597cdbd753 100644 --- a/rows.c +++ b/rows.c @@ -1,13 +1,5 @@ #include "hDateien/rows.h" -// Vorbedingnug: / - -// Nachbedingung: gibt eine zufällige Position für ein Stein zurück - -int gen_stone(){ - int p = (rand() % 9)*ROW_SIZE; - return(p); -} //Vorbedingung: -200<=y_pos<=1000 @@ -55,7 +47,7 @@ struct Row* grass(bool dark,bool gold,int y_pos){ int p = rand() % 10; if (p < 7){ - n->stone = gen_stone(); + n->stone = (rand() % 9)*ROW_SIZE; n->bird = NULL; }else{ p = (rand() % 10) * ROW_SIZE;