1
0
mirror of synced 2025-02-16 10:22:35 +01:00
jujube/src/Main.cpp

33 lines
736 B
C++
Raw Normal View History

2019-10-22 01:53:08 +02:00
#include <SFML/Graphics.hpp>
2019-10-23 01:13:01 +02:00
#include "Model/Chart.hpp"
#include "Model/MusicList.hpp"
#include "Model/Score.hpp"
2019-10-22 01:53:08 +02:00
2019-10-23 01:13:01 +02:00
#include "Screens/MusicSelect.hpp"
#include "Screens/Gameplay.hpp"
#include "Screens/Result.hpp"
int main(int argc, char const *argv[]) {
2019-10-23 23:39:10 +02:00
2019-10-22 01:53:08 +02:00
sf::RenderWindow window(sf::VideoMode(800,600), "jujube");
window.setVerticalSyncEnabled(true);
2019-10-23 23:39:10 +02:00
2019-10-23 01:13:01 +02:00
Screen::MusicSelect music_select;
2019-10-23 23:39:10 +02:00
2019-10-23 01:13:01 +02:00
while (true) {
2019-10-23 23:39:10 +02:00
Chart& selected_chart = music_select.select_chart(window);
2019-10-23 01:13:01 +02:00
Screen::Gameplay gameplay(selected_chart);
2019-10-23 23:39:10 +02:00
Score score = gameplay.play_chart(window);
2019-10-29 18:42:21 +01:00
Screen::Result result_screen(score);
result_screen.display(window);
2019-10-23 23:39:10 +02:00
2019-10-22 01:53:08 +02:00
}
2019-10-23 23:39:10 +02:00
2019-10-22 01:53:08 +02:00
return 0;
2019-10-23 23:39:10 +02:00
2019-10-22 01:53:08 +02:00
}