make7libre  0.8.6
main.cc
Go to the documentation of this file.
1 /*
2  * Make7Libre, free (as in freedom) implementation of the
3  * unfamous game 'Make 7 Hexa Puzzle'
4  * Copyright 2016-2017 (C) Felicien PILLOT <felicien.pillot@member.fsf.org>
5  *
6  * This file is part of Make7Libre.
7  *
8  * Make7Libre is free software: you can redistribute it and/or modify
9  * under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * Make7Libre is distributed in the hope that it will be useful,
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * with Make7Libre. If not, see <http://www.gnu.org/licenses/>.
20  */
21 /***********
22  * main.cc *
23  * ~~~~~~~ *
24  ***********/
25 
26 #include <iostream> // cout, cin...
27 #include <stdlib.h> // srand, rand
28 #include <ctime> // ctime
29 #include <gtkmm.h>
30 #include "../include/game.h"
31 
32 int
33 main (int argc, char** argv)
34 {
35  Gtk::Main kit (int argc, char** argv);
36  Glib::RefPtr<Gtk::Application> app =
37  Gtk::Application::create (argc, argv, "org.gtkmm.example");
38  Game* game = new Game ();
39  /* Seeding the random */
40  srand (time (NULL));
41  /* Preparing GUI and starting the game */
42  game->import_every_widget ();
43  game->connect_every_button ();
44  game->launch_game ();
45  game->display (app);
46  // End
47  return 0;
48 }
49 
void import_every_widget()
Function containing a lot of lines too.
Definition: game.cc:165
void connect_every_button()
Function containing a lot of lines.
Definition: game.cc:83
Main class contains the graphical interface (set by Glade and imported with Gtk::Builder) and the mai...
Definition: game.h:44
int main(int argc, char **argv)
Definition: main.cc:33
void launch_game()
All initializations needed at the beginning of a new game.
Definition: game.cc:239
void display(Glib::RefPtr< Gtk::Application > app)
Here is actually displayed the window.
Definition: game.cc:130