source: trunk/OpenYahtzee/src/MainFrame.h @ 15

Last change on this file since 15 was 15, checked in by guyru, 7 years ago

fixed header info, fixed version info

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1// $Header$
2/***************************************************************************
3 *   Copyright (C) 2006 by Guy Rutenberg   *
4 *   guy@Guy_Computer   *
5 *                                                                         *
6 *   This program is free software; you can redistribute it and/or modify  *
7 *   it under the terms of the GNU General Public License as published by  *
8 *   the Free Software Foundation; either version 2 of the License, or     *
9 *   (at your option) any later version.                                   *
10 *                                                                         *
11 *   This program is distributed in the hope that it will be useful,       *
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14 *   GNU General Public License for more details.                          *
15 *                                                                         *
16 *   You should have received a copy of the GNU General Public License     *
17 *   along with this program; if not, write to the                         *
18 *   Free Software Foundation, Inc.,                                       *
19 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20 ***************************************************************************/
21
22 /***********************************************
23 *      This File contains the declaration      *
24 *      of the class MainFrame                  *
25 ***********************************************/
26#include "SettingsDB.h"
27#include "HighScoreTableDB.h"
28#ifndef MAINFRAME_INC
29#define MAINFRAME_INC
30
31// Declare our main frame class
32class MainFrame : public wxFrame
33{
34public:
35        // Constructor
36        MainFrame(const wxString& title,  const wxSize& size, long style);
37
38        // Event handlers
39        void OnQuit(wxCommandEvent& event);
40        void OnAbout(wxCommandEvent& event);
41        void OnNewGame (wxCommandEvent& event);
42        void OnShowHighscore (wxCommandEvent& event);
43        void OnSettings (wxCommandEvent& event);
44
45        void OnRollButton (wxCommandEvent& event);
46        void OnUpperButtons (wxCommandEvent& event);
47        void On3ofakindButton (wxCommandEvent& event);
48        void On4ofakindButton (wxCommandEvent& event); 
49        void OnFullHouseButton (wxCommandEvent& event);
50        void OnSmallSequenceButton (wxCommandEvent& event);
51        void OnLargeSequenceButton (wxCommandEvent& event);
52        void OnYahtzeeButton (wxCommandEvent& event);
53        void OnChanceButton (wxCommandEvent& event);
54
55       
56
57private:
58        void ClearDiceHash();
59        void ResetRolls();
60        void YahtzeeBonus();
61        void EndofGame();
62        void HighScoreHandler(int score);
63
64        //pointers to hold bitmap data for the dices
65        wxBitmap *bitmap_dices[6];
66
67        short int dice[5];      //holds the dices score
68        short int dicehash[6];  //the dice hash
69        short int m_rolls;      //holds how many rolls left
70        short int m_numofplaysleft; //holds how many times the user got to score untill the end of the game
71        bool m_yahtzee;
72
73        SettingsDB *m_settingsdb; ///handles the settings database
74        HighScoreTableDB *m_highscoredb; ///handles the highscore database managment
75
76};
77#endif
Note: See TracBrowser for help on using the repository browser.