diff --git a/utils.py b/utils.py index 590a4da..2cdb777 100644 --- a/utils.py +++ b/utils.py @@ -40,7 +40,8 @@ def generate_houses(all_sprites, obstacles_coords): while(home_counter != 0): x, y = generate_rand_coordinates( (PLAY_WIDTH//CELL_SIZE)-1, (PLAY_HEIGHT//CELL_SIZE)-1) - if(((x, y) or (x,y-1)) not in obstacles_coords): + if(((x, y) or (x+1,y)) not in obstacles_coords): + print(x,y) houses.append(House(x, y, 10, 10, 10)) obstacles_coords.append((x, y)) home_counter = home_counter - 1