Changeset 193


Ignore:
Timestamp:
01/05/09 19:12:38 (4 years ago)
Author:
guyru
Message:

Basic statisitics class

Location:
trunk/src
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MainFrame.cpp

    r191 r193  
    9595        config_file_str = config_file.utf8_str(); 
    9696        m_config = new configuration::Configuration(config_file_str); 
     97        m_stats = new statistics::Statistics(m_config); 
    9798 
    9899        m_evt_handler = new MainFrameEvtHandler(this); 
     
    570571        m_skiproll = true; 
    571572 
     573        if (m_numofplaysleft == 13) 
     574                m_stats->game_started(); 
     575 
    572576        //fill the dice array with the old values 
    573577        dice[0]=m_score_dice.GetDice(1); 
     
    980984        wxMessageBox(tempstr, wxT("Game Ended"), wxOK | wxICON_INFORMATION, this); 
    981985 
     986        m_stats->game_finished(lowerscore+upperscore); 
     987 
    982988        //submit to high score 
    983989        HighScoreHandler(lowerscore+upperscore); 
     
    13321338MainFrame::~MainFrame() { 
    13331339        // free pointers 
     1340        delete m_stats; 
    13341341        delete m_config; 
    13351342        delete m_evt_handler; 
  • trunk/src/MainFrame.h

    r180 r193  
    1 // $Header$ 
    21/*************************************************************************** 
    3  *   Copyright (C) 2006-2008 by Guy Rutenberg   * 
     2 *   Copyright (C) 2006-2009 by Guy Rutenberg   * 
    43 *   guyrutenberg@gmail.com   * 
    54 *                                                                         * 
     
    3029#include "ScoreDice.h" 
    3130#include "configuration.h" 
     31#include "statistics.h" 
    3232 
    3333namespace main_frame { 
     
    7777 
    7878        configuration::Configuration *m_config; 
     79        statistics::Statistics *m_stats; 
    7980 
    8081private: 
  • trunk/src/Makefile.am

    r191 r193  
    1515        settings_dialog.h \ 
    1616        ScoreDice.cpp \ 
     17        statistics.cpp \ 
    1718        wxDynamicBitmap.cpp \ 
    1819        one.xpm \ 
     
    3233        MainFrame.h \ 
    3334        ScoreDice.h \ 
     35        statistics.h \ 
    3436        wxDynamicBitmap.h \ 
    3537        ../openyahtzee.vcproj \ 
Note: See TracChangeset for help on using the changeset viewer.