garten

view growth.c @ 18:5937504619f2

rename game.h -> modules.h; added some error handling; and more
author meillo@marmaro.de
date Wed, 23 Jul 2008 17:40:55 +0200
parents 5e6c9260913a
children
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "db.h"
6 int grow_plants() {
7 sprintf(query,
8 "update field "
9 "set age = age+1, size = size+1 "
10 );
11 if (!db_update(query)) {
12 db_error("grow plants");
13 return 0;
14 }
15 return 1;
16 }
19 int growth(void) {
20 return grow_plants();
21 }