fix: show previews for pasch dominos

This commit is contained in:
orangerot 2025-10-15 16:07:56 +02:00
parent 6f3e302e09
commit 4dc761dbce

8
game.c
View file

@ -75,8 +75,10 @@ void get_prewiews() {
previews[ii].front.val |= (
(bricks.items.eye[iii].x == previews[ii].back.x && bricks.items.eye[iii].y == previews[ii].back.y) ||
(bricks.items.eye[iii].x == previews[ii].front.x && bricks.items.eye[iii].y == previews[ii].front.y)
|| (e.val == active.front.val && direction[ii].x < 0)
|| (e.val == active.back.val && direction[ii].x >= 0)
|| (
(active.front.val != active.back.val) &&
((e.val == active.front.val && direction[ii].x < 0) || (e.val == active.back.val && direction[ii].x >= 0))
)
);
}
}
@ -212,7 +214,7 @@ void init(struct image canvas) {
for (size_t i = 0; i < 5; i++) {
hand[hand_count++] = (struct brick) {
.front = {.val = rand() % 6},
.back = {.val = rand() % 6},
.back = {.val = rand() % 6},
};
}
}