-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (32 loc) · 914 Bytes
/
main.cpp
File metadata and controls
41 lines (32 loc) · 914 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
#include <iostream>
#include <SFML/Graphics.hpp>
#include "Bomberman/bomberman.h"
int main() {
bool GAME_STARTED = true;
sf::RenderWindow window(sf::VideoMode(1920,1080,32),"DaveStation");
window.setFramerateLimit(60);
Bomberman game;
game.start(window);
while(window.isOpen()){
sf::Event event;
while(window.pollEvent(event)) {
if (event.type == sf::Event::Closed) {
window.close();
}
}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{
GAME_STARTED = false;
game.exit();
}
window.clear(sf::Color::Black);
if(GAME_STARTED) {
game.addEvents(window);
window.draw(game);
// window.draw(game.getThumbnail());
// window.draw(game.getInfo(window));
}
window.display();
}
return 0;
}