blob: ac62fdb39bdf7049a74dce0004031de54f650e4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <ncurses.h>
struct p {
int x;
int y;
};
struct p rP() {
struct p p;
p.x = (rand() % (width - 2)) + 1;
if (p.x%2 == 0) {
} else {
p.x++;
}
p.y = (rand() % (height - 2)) + 1;
return p;
}
|