-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (30 loc) · 1.24 KB
/
Copy pathmain.cpp
File metadata and controls
38 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/***********************************************************************************
* Eric Karpovits - Graphical Sorting - Mr. Kronberg *
* Fully functioning sorting program that sorts an unsorted vector of 150 elements.*
* Everything is visualized and binary search is implemented. *
* *
* Last Modified: November 15, 2020 *
***********************************************************************************/
#include "declarations.h"
int main() {
// Seed random timer
srand (time(NULL));
// Create allegro object
Allegro allegro;
// Create sorting class object with the allegro class as a member
Sorting sorting(allegro);
// Create app object that has the other two objects as members
AppManagement app(allegro, sorting);
/******* Initialize allegro *************/
int errorCode = allegro.initializeAllegro();
if (errorCode != 0) {
return errorCode;
}
// Setup buttons
allegro.buttonSetup();
/******* Main loop ********/
while (app.isContinuePlaying()) {
app.play();
}
return 0;
}