diff --git a/grid.c b/grid.c index 35a6949..2a486cf 100644 --- a/grid.c +++ b/grid.c @@ -98,7 +98,7 @@ void drawGrid(Grid* grid) height = grid->size/width; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - if (grid->state[toIndex(grid, x, y)]) mvprintw(y, x, "x"); + if (grid->state[toIndex(grid, x, y)]) mvprintw(y, x, "X"); else mvprintw(y, x, " "); } } diff --git a/main.c b/main.c index ecc50dc..b06126c 100644 --- a/main.c +++ b/main.c @@ -27,28 +27,20 @@ int main() // stdscr created by initscr() getmaxyx(stdscr, height, width); - Vect2i pos = {0, 0}; - Vect2i vel = {1, 1}; - //hz - const int FRAME_RATE = 30; + const int FRAME_RATE = 10; const int DELAY = (float)pow(10,6)/(float)FRAME_RATE; Grid grid; initGrid(&grid, width, height); randomizeGrid(&grid); - putPixel(&grid, pos.x, pos.y); while (running) { drawGrid(&grid); refresh(); - //moveVect2i(&pos, vel.x, vel.y); - //contain(&pos.x, &vel.x, 0, width-1); - //contain(&pos.y, &vel.y, 0, height-1); - updateGrid(&grid); usleep(DELAY);