garten

view growth.c @ 19:eb8db0d906de

updated runtick.sh to current program
author meillo@marmaro.de
date Wed, 23 Jul 2008 17:44:15 +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 }