garten
view growth.c @ 13:f1d43b52ed36
and here now is the main program
author | meillo@marmaro.de |
---|---|
date | Wed, 23 Jul 2008 15:20:35 +0200 |
parents | 176ee28e7464 |
children | 5e6c9260913a |
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "db.h"
4 #include "game.h"
7 void grow_plants() {
8 /* get weather and last environments to calculate the next one */
9 sprintf(query, "update field \
10 set age = age+1, size = size+1 ");
11 stmt = db_query(query);
12 if (!db_update(query)) {
13 printf("E: update failed ++ %s\n", sqlite3_errmsg(db));
14 }
15 sqlite3_finalize(stmt);
16 }
19 void growth(void) {
20 grow_plants();
21 }