Initial commit
This commit is contained in:
parent
392362b8ee
commit
8c7ea4970a
74 changed files with 8220 additions and 30 deletions
26
ms_ui_utils.c
Normal file
26
ms_ui_utils.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*----------------------------------------------------------
|
||||
* HTBLA-Leonding / Class: <your class>
|
||||
* ---------------------------------------------------------
|
||||
* Exercise Number: B1
|
||||
* Title: Mine Sweeper User Interface Utilities
|
||||
* Author: */<your name>/*
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Implementation of ms_ui_utils.h.
|
||||
* ----------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void msu_init_rand() {
|
||||
srand(time(0));
|
||||
}
|
||||
|
||||
CellIdx msu_get_random_index(Count upper_limit) {
|
||||
return (upper_limit == 0 ? 0 : rand() % (upper_limit));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue