fix: show previews for pasch dominos
This commit is contained in:
parent
6f3e302e09
commit
4dc761dbce
8
game.c
8
game.c
|
@ -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},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue