elefantes sobre sitios vacíos
This commit is contained in:
parent
bc099eef10
commit
2870392cf3
7
screen.c
7
screen.c
@ -57,11 +57,11 @@ struct coord randomCoord(WINDOW * win){
|
|||||||
|
|
||||||
struct coord res = {rX, rY};
|
struct coord res = {rX, rY};
|
||||||
|
|
||||||
if (mvwinch(win, res.y, res.x) == ' '){
|
if (mvwinch(win, res.y, res.x) != ' '){
|
||||||
return res;
|
|
||||||
} else {
|
|
||||||
randomCoord(win);
|
randomCoord(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void generarElefantes(WINDOW * win, struct coord *buff){
|
void generarElefantes(WINDOW * win, struct coord *buff){
|
||||||
@ -169,4 +169,3 @@ int screen() {
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user