blob: 7484950defd20537a9cc6f295e6b63a3ddb1483e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <stdlib.h>
#include "ball.h"
struct ball *
new_ball(int x, int y)
{
struct ball *b;
b = malloc(sizeof(*b));
if (b == NULL) {
return NULL;
}
b->x = x;
b->y = y;
return b;
}
|