From 2870392cf38ef4017e64e2875d5ea3fbb1ea40e0 Mon Sep 17 00:00:00 2001 From: serxoz Date: Sun, 24 Oct 2021 19:21:14 +0200 Subject: [PATCH] =?UTF-8?q?elefantes=20sobre=20sitios=20vac=C3=ADos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- screen.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/screen.c b/screen.c index e8e81b1..6779d2c 100644 --- a/screen.c +++ b/screen.c @@ -57,11 +57,11 @@ struct coord randomCoord(WINDOW * win){ struct coord res = {rX, rY}; - if (mvwinch(win, res.y, res.x) == ' '){ - return res; - } else { + if (mvwinch(win, res.y, res.x) != ' '){ randomCoord(win); } + + return res; } void generarElefantes(WINDOW * win, struct coord *buff){ @@ -169,4 +169,3 @@ int screen() { return 0; } -