Changeset 55


Ignore:
Timestamp:
17/01/07 18:08:53 (8 years ago)
Author:
guyru
Message:

implemented the Yahtzee Joker scoring rules.

Location:
trunk/OpenYahtzee
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/ChangeLog

    r51 r55  
    1313- Redesigned the Settings Dialog. 
    1414- The main window of the game is now unresizable (fixed size). 
     15- Disabled the ability to undo the last move of the game (this allowed people  
     16  to re-enter their score to the high score table over and over again). 
     17- Implemented the Yahtzee Joker scoring rules. 
    1518 
    1619Open Yahtzee 1.6: 
  • trunk/OpenYahtzee/TODO

    r51 r55  
    55 
    66- Set a better icon for the windows installer 
    7 - Disable the ability to undo the last move of the game. 
    87- Add abilliy to adjust how many times (avreage) will the dice roll before they stop. 
    98- Multiplayer mode. 
     
    1514- Make the dice roll a couple of times before they stop. 
    1615- Change the "reset high score" toggle button to a checkbox. 
     16- Disable the ability to undo the last move of the game. 
    1717 
    1818 
  • trunk/OpenYahtzee/openyahtzee.kdevses

    r52 r55  
    77  </Doc0> 
    88  <Doc1 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/openyahtzee.cpp" > 
    9    <View0 line="55" Type="Source" /> 
     9   <View0 Type="Source" /> 
    1010  </Doc1> 
    1111  <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 
    12    <View0 line="240" Type="Source" /> 
     12   <View0 line="695" Type="Source" /> 
    1313  </Doc2> 
    1414  <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ObjectsID.h" > 
     
    1616  </Doc3> 
    1717  <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.h" > 
    18    <View0 line="82" Type="Source" /> 
     18   <View0 line="69" Type="Source" /> 
    1919  </Doc4> 
    2020  <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/DBwrapper.h" > 
    21    <View0 Type="Source" /> 
     21   <View0 line="0" Type="Source" /> 
    2222  </Doc5> 
    2323  <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreTableDB.cpp" > 
    24    <View0 Type="Source" /> 
     24   <View0 line="0" Type="Source" /> 
    2525  </Doc6> 
    2626  <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDialog.cpp" > 
     
    2828  </Doc7> 
    2929  <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.cpp" > 
    30    <View0 line="0" Type="Source" /> 
     30   <View0 Type="Source" /> 
    3131  </Doc8> 
    3232  <Doc9 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreTableDB.h" > 
     
    3434  </Doc9> 
    3535  <Doc10 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreDialog.cpp" > 
    36    <View0 line="0" Type="Source" /> 
     36   <View0 line="125" Type="Source" /> 
    3737  </Doc10> 
    3838  <Doc11 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/Icon.h" > 
     
    4040  </Doc11> 
    4141  <Doc12 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDialog.h" > 
    42    <View0 line="54" Type="Source" /> 
     42   <View0 Type="Source" /> 
    4343  </Doc12> 
    4444  <Doc13 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.cpp" > 
    45    <View0 line="0" Type="Source" /> 
     45   <View0 Type="Source" /> 
    4646  </Doc13> 
    4747  <Doc14 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/DBwrapper.cpp" > 
     
    4949  </Doc14> 
    5050  <Doc15 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.h" > 
    51    <View0 line="42" Type="Source" /> 
     51   <View0 Type="Source" /> 
    5252  </Doc15> 
    5353  <Doc16 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/openyahtzee.rc" > 
  • trunk/OpenYahtzee/src/MainFrame.cpp

    r53 r55  
    2525 ***********************************************/ 
    2626 
    27 //#define DEBUG 
     27#define DEBUG 
    2828 
    2929#include <wx/wx.h> 
     
    567567                if (dicehash[i] == 3) 
    568568                        three = true; 
    569         if (two && three) 
     569        if ((two && three) || YahtzeeJoker()) 
    570570                ((wxTextCtrl*) FindWindow(ID_FULLHOUSETEXT))->SetValue(wxT("25")); 
    571571        else 
     
    589589                (dicehash[2]>=1 && dicehash[3]>=1 && dicehash[4]>=1 && dicehash[5]>=1)) 
    590590                        sequence = true; 
    591         if (sequence) 
     591        if (sequence || YahtzeeJoker()) 
    592592                ((wxTextCtrl*) FindWindow(ID_SMALLSEQUENCETEXT))->SetValue(wxT("30")); 
    593593        else 
     
    610610                (dicehash[1]==1 && dicehash[2]==1 && dicehash[3]==1 && dicehash[4]==1 && dicehash[5]==1)) 
    611611                        sequence = true; 
    612         if (sequence) 
     612        if (sequence || YahtzeeJoker()) 
    613613                ((wxTextCtrl*) FindWindow(ID_LARGESEQUENCETEXT))->SetValue(wxT("40")); 
    614614        else 
     
    692692} 
    693693 
     694bool MainFrame::YahtzeeJoker() 
     695{ 
     696        if ((dice[0]==dice[1]) && (dice[1]==dice[2]) && (dice[1]==dice[3]) && (dice[1]==dice[4]) && !(FindWindow(ID_ACES+dice[0])->IsEnabled()) && !(FindWindow(ID_YAHTZEE)->IsEnabled())) { 
     697                return true; 
     698        } 
     699        return false; 
     700} 
     701 
    694702void MainFrame::EndofGame() 
    695703{ 
  • trunk/OpenYahtzee/src/MainFrame.h

    r49 r55  
    6868        void ResetRolls(); 
    6969        void YahtzeeBonus(); 
     70        bool YahtzeeJoker(); 
    7071        void EndofGame(); 
    7172        void HighScoreHandler(int score); 
Note: See TracChangeset for help on using the changeset viewer.