-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainGUI.cpp
More file actions
34 lines (27 loc) · 1.12 KB
/
Copy pathMainGUI.cpp
File metadata and controls
34 lines (27 loc) · 1.12 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
// Email: razcohenp@gmail.com
// Main.cpp - Main entry point for the Coup game application
// This file launches the graphical user interface and handles application lifecycle
#include "include/GameGUI.hpp"
#include <iostream>
int main() {
try {
// Starting COUP Game with GUI
// Initialize the main game interface for user interaction
// GameGUI handles all visual elements and user input processing
coup::GameGUI gui;
// Attempt to load fonts and initialize the graphics subsystem
if (!gui.initialize()) {
std::cout << "Error! Something is wrong." << std::endl;
return 1; // Exit with error code if initialization fails
}
// GUI initialized successfully
// Enter the main game loop - this blocks until user exits
gui.run();
}
catch (const std::exception& e) {
std::cout << "Error! Something is wrong." << std::endl;
return 1; // Exit with error code if an exception occurs
}
std::cout << "Thanks for playing COUP!" << std::endl;
return 0; // Successful application exit
}