add losing when the next shape overlaps the current one (just a basic quit)

This commit is contained in:
2025-02-11 11:51:24 +01:00
parent 4ed4e9522f
commit 8105d35272

View File

@@ -2,6 +2,7 @@
#include <stdint.h> #include <stdint.h>
#include "../../main.h"
#include "../../window/colour8.h" #include "../../window/colour8.h"
#include "../game.h" #include "../game.h"
#include "shapes.h" #include "shapes.h"
@@ -114,6 +115,8 @@ void place_update(game_data* const game_data, InputData const move) {
clear_rows(game_data->rows, &game_data->score); // clear the rows that have been completed clear_rows(game_data->rows, &game_data->score); // clear the rows that have been completed
next_shape(game_data); next_shape(game_data);
if (shape_intersects(game_data->rows, game_data->curr_idx, game_data->sel_x, game_data->sel_y))
stop();
return; return;
} }