-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
48 lines (38 loc) · 1011 Bytes
/
main.cpp
File metadata and controls
48 lines (38 loc) · 1011 Bytes
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
39
40
41
42
43
44
45
46
47
48
/*
main.cpp
Author: [Your Name]
Roll Number: [Your Roll Number]
Project Title: Xonix Game - DSA Project
*/
#include <SFML/Graphics.hpp>
#include "Game.h"
#include "Menu.h"
#include "Auth.h"
#include "MinHeap.h"
#include "PriorityQueue.h"
using namespace sf;
int main() {
// Create the main window
RenderWindow window(VideoMode(800, 600), "Xonix Game");
window.setFramerateLimit(60);
// Initialize authentication system
Auth auth;
// Create menu system
Menu menu(&window, &auth);
// Game loop
while (window.isOpen()) {
Event event;
while (window.pollEvent(event)) {
if (event.type == Event::Closed) {
window.close();
}
// Handle menu input
menu.processInput(event);
}
// Update menu
menu.update(1.0f / 60.0f); // Assuming 60 FPS
// Display menu
menu.display();
}
return 0;
}