Skip to content
Snippets Groups Projects
Commit 3bc5679c authored by Janos's avatar Janos
Browse files

Spieler kann nicht mehr auf einem Stein starten

parent fb601b1d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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;
}
}
}
......
#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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment