From 27cc057573680a40deb7226697af689a0149ae3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20T=C3=A1losi?= Date: Sat, 31 Dec 2022 11:47:23 +0100 Subject: [PATCH] =?UTF-8?q?solitaire:=20fixed=20card=20placement=20to=20no?= =?UTF-8?q?t=20allow=20placing=20=E2=99=A03=20on=20top=20row=20when=20ther?= =?UTF-8?q?e=20was=20no=20card=20there.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/plugins/solitaire/solitaire.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/plugins/solitaire/solitaire.c b/applications/plugins/solitaire/solitaire.c index e1fffbc8a..1b56e2150 100644 --- a/applications/plugins/solitaire/solitaire.c +++ b/applications/plugins/solitaire/solitaire.c @@ -255,6 +255,10 @@ bool place_on_top(Card* where, Card what) { int8_t b_letter = (int8_t)what.character; if(a_letter == 12) a_letter = -1; if(b_letter == 12) b_letter = -1; + + if(where->disabled && b_letter != -1) + return false; + if((a_letter + 1) == b_letter) { where->disabled = what.disabled; where->pip = what.pip;