Commit eea6b83e authored by Francois Foltete's avatar Francois Foltete
Browse files

ajout des eleves

parent bb797ed6
......@@ -19,7 +19,8 @@ class Actor : public Texturable
* @param surname le nom de famille du personnage
* @param texturePath le chemin du fichier de texture
*/
Actor(const std::string &name, const std::string &surname,
Actor(const std::string &name,
const std::string &surname,
const std::string &texturePath);
/**
......
......@@ -28,8 +28,7 @@ class Classroom : public Texturable
: Texturable(RESOURCES_FOLDER "images/salles/salle" + std::to_string(n) +
".png")
, teacher(teacher)
{
}
{}
~Classroom();
/**
......
......@@ -53,8 +53,12 @@ class Student : Actor
* @param motivation Motivation de l'élève
* @param skill Qualité de l'élève
*/
Student(std::string name, std::string surname, Classroom &classroom,
double mood, double motivation, double skill);
Student(std::string name,
std::string surname,
Classroom &classroom,
double mood,
double motivation,
double skill);
~Student();
/**
......
......@@ -30,8 +30,10 @@ class Teacher : public Actor
* @param pedagogie Niveau de pédagogie du professeur
* @param meritocratic Niveau de méritocratie du professeur
*/
Teacher(const std::string &name, const std::string &surname,
double pedagogie, double meritocratic);
Teacher(const std::string &name,
const std::string &surname,
double pedagogie,
double meritocratic);
/**
* @brief Get le niveau de pédagogie du professeur
......
#ifndef UTILS_H
#define UTILS_H
void maximizeNextWindow();
void centerNextWindow(float width, float height);
sf::Vector2u getMainWindowSize();
void
maximizeNextWindow();
void
centerNextWindow(float width, float height);
sf::Vector2u
getMainWindowSize();
#endif /* UTILS_H */
---,ID,Name,Surname,Mood,Skill,Motivation
Eleve_0,0,Knutur,Arthur,5,6,7
Eleve_1,1,Dodeman,Amorgen,3,8,3
Eleve_2,2,Gounouf,Cathal,2,2,2
Eleve_3,3,Juleson,Cesar,4,4,6
Eleve_4,4,Helgi,Felix,7,3,7
Eleve_5,5,Hjalmarsson,Kane,9,7,7
Eleve_6,6,Bjarnason,Lucan,10,3,9
Eleve_7,7,Arnason,Agate,7,5,5
Eleve_8,8,Kristoffersen,Aveleen,4,7,4
Eleve_9,9,Helguson ,Cordelia,3,5,2
Eleve_10,10,Osmond,Cleena,6,6,6
Eleve_11,11,Hansen,Cleophee,4,2,9
Eleve_12,12,Toeframathurinn,Merlin,8,4,5
Eleve_13,13,Bryndisarson ,Sachka,7,3,7
Eleve_14,14,Turrou,Audric,3,8,2
Eleve_15,15,Renouf,Arwen,5,5,5
Eleve_16,16,Alfur,Gauvain,4,8,6
Eleve_17,17,Asgrimsson,Arya,1,1,1
Eleve_18,18,Inguier,Cirdan,2,3,2
Eleve_19,19,Eriksson,Valar,6,5,4
Eleve_20,20,Yngouf,Matan,7,6,7
Eleve_21,21,Varangot,Olaf,2,6,2
Eleve_22,22,Aze,Leif,5,4,9
Eleve_23,23,Ernouf,Bjarne,2,4,5
Eleve_24,24,Kirkegaard,Gandalf,10,6,4
Eleve_25,25,Persson,Markus,4,5,6
Eleve_26,26,Foutete,Franco,3,5,10
Eleve_27,27,Ovenn,Piro,6,4,7
Eleve_28,28,Leinfebr,Lias,5,4,7
Eleve_29,29,Miglagla,Yonn,4,3,5
Eleve_30,30,Voyaar,Mateu,3,7,5
Eleve_31,31,Gulbrandsen,Egill,4,3,5
Eleve_32,32,Jespersen,Marcus,10,9,10
Eleve_33,33,Jakobsen,Frederik,4,6,5
Eleve_34,34,Mortensen,Alexander,6,5,8
Eleve_35,35,Norgaard,Rasmus,4,5,6
Eleve_36,36,Gregersen,Nicolai,8,5,6
Eleve_37,37,Andersen,Alberte,4,6,8
Eleve_38,38,Johansen,Oskar,6,5,3
Eleve_39,39,Kristensen,Mark,7,5,5
Eleve_40,40,Jespersen,Rosa,8,5,6
......@@ -2,10 +2,10 @@
#include "model/Actor.h"
Actor::Actor(const std::string &name, const std::string &surname,
Actor::Actor(const std::string &name,
const std::string &surname,
const std::string &texturePath)
: Texturable(texturePath)
, name(name)
, surname(surname)
{
}
{}
......@@ -8,8 +8,9 @@
void
Classroom::render() const
{
ImGui::ImageButton(texture, ImVec2(ImGui::GetIO().DisplaySize.x / 2.1,
ImGui::GetIO().DisplaySize.y / 2.2));
ImGui::ImageButton(texture,
ImVec2(ImGui::GetIO().DisplaySize.x / 2.1,
ImGui::GetIO().DisplaySize.y / 2.2));
}
Classroom::~Classroom()
......
......@@ -31,7 +31,8 @@ void
School::render() const
{
maximizeNextWindow();
if (ImGui::Begin(name.c_str(), nullptr,
if (ImGui::Begin(name.c_str(),
nullptr,
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove)) {
ImGui::Columns(2, NULL);
ImGui::Separator();
......
......@@ -3,10 +3,11 @@
#include "model/Actor.h"
#include "model/Teacher.h"
Teacher::Teacher(const std::string &name, const std::string &surname,
double pedagogie, double meritocratic)
Teacher::Teacher(const std::string &name,
const std::string &surname,
double pedagogie,
double meritocratic)
: Actor(name, surname, "resources/images/profs/prof1.png")
, pedagogue(pedagogie)
, meritocratic(meritocratic)
{
}
{}
......@@ -6,7 +6,8 @@
#include "view/GameWindow.h"
GameWindow::GameWindow()
: sf::RenderWindow(sf::VideoMode::getDesktopMode(), "Headmaster Simulator",
: sf::RenderWindow(sf::VideoMode::getDesktopMode(),
"Headmaster Simulator",
sf::Style::Default)
, background(0.f, 0.f, 0.f)
{
......@@ -17,8 +18,11 @@ GameWindow::GameWindow()
setVerticalSyncEnabled(true);
resetGLStates();
ImGui::SFML::Init(*this, static_cast<sf::Vector2f>(getSize()), true,
RESOURCES_FOLDER "fonts/Roboto-Light.ttf", 32.f);
ImGui::SFML::Init(*this,
static_cast<sf::Vector2f>(getSize()),
true,
RESOURCES_FOLDER "fonts/Roboto-Light.ttf",
32.f);
/* Activation de la fenêtre. */
setActive(true);
......
......@@ -17,9 +17,10 @@ void
MainMenu::render() const
{
centerNextWindow(320, 580);
if (ImGui::Begin("Menu principal", nullptr, ImGuiWindowFlags_NoTitleBar |
ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove)) {
if (ImGui::Begin("Menu principal",
nullptr,
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove)) {
if (ImGui::Button("Nouvelle partie"))
Game::newGame();
......
......@@ -13,8 +13,7 @@
MainView::MainView()
: school(new School("L'école infernale"))
{
}
{}
MainView::~MainView()
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment