diff --git a/gol.c b/gol.c index a501179..0d8932b 100644 --- a/gol.c +++ b/gol.c @@ -95,7 +95,7 @@ void draw_grid(bool grid[SIZE][SIZE], int cellw, int cellh, bool gamestate){ if(gamestate == false){ DrawRectangle((GetMouseX()/cellw)*cellw, (GetMouseY()/cellh)*cellh, cellw, cellh, WHITE); - DrawText("LMB: Draw, RMB: Erase, Space: Start/Stop the game, ESC: Exit", WIDTH*0.15, HEIGHT*0.9, 20, WHITE); + DrawText("LMB: Draw, RMB: Erase, C: Clear the screen, Space: Start/Stop the game, ESC: Exit", WIDTH*0.05, HEIGHT*0.9, 20, WHITE); } EndDrawing(); } @@ -130,6 +130,10 @@ int main() grid[GetMouseX()/10][GetMouseY()/10] = false; } + if(IsKeyPressed(KEY_C)){ + initialize_grid(grid); + } + draw_grid(grid, cellw, cellh, gamestate); mirror_grid(grid, mirror); }