comparison utils.c @ 6:40a8bdbe2005

Refactor to array of structures
author Dennis C. M. <dennis@denniscm.com>
date Tue, 13 Jun 2023 18:37:23 +0100
parents 6be2faa7ed6e
children f159eec07daf
comparison
equal deleted inserted replaced
5:6be2faa7ed6e 6:40a8bdbe2005
11 11
12 12
13 int random_int(int min, int max) { 13 int random_int(int min, int max) {
14 return rand() % ((max - min) + 1) + min; 14 return rand() % ((max - min) + 1) + min;
15 } 15 }
16
17
18 void draw_rectangle(int x_position, int rect_height, int rect_width, int window_height) {
19 glVertex2f(x_position, window_height - 100);
20 glVertex2f(x_position + rect_width, window_height - 100);
21 glVertex2f(x_position + rect_width, rect_height);
22 glVertex2d(x_position, rect_height);
23 }