Ejemplo n.º 1
0
        // *** TOTAL SCORE ***
        public void TotalScore_MatchMode(MatchScore matchScore, int matchNo)
        {
            if (loadingFromDB)
                return;

            DealScore ts_score, ts_score_OLD;
            ts_score = (matchScore as IMatchGetScore).GetScore();
            ts_score_OLD = (DealScore) DB_Matches_TotalScores[matchNo];

            if (!ts_score.Equals(ts_score_OLD))
            {
                //MessageBox.Show("savem [" + matchNo + "]  " + ts_score_OLD + " => " + ts_score); //delme

                DB_SaveMatchScore(matchNo, ts_score);
            }
        }
Ejemplo n.º 2
0
        // Match Stuff:
        public void SetMatchScore(MatchScore TotalScore, int matchNo, int colScore)
        {
            int iNS = 0, iEW = 0;
            bool compl = true;
            if(MATCHES_GetDealsCount(matchNo) < GameSettings_DealsInMatch)
                compl = false;

            SimpleScore dscore;
            for (int i = MATCHES_GetFirstLine(matchNo); i < (MATCHES_GetFirstLine(matchNo) + MATCHES_GetDealsCount(matchNo)); i++)
            {
                dscore = (SimpleScore)VALUES[i, colScore];
                if (dscore == null || !dscore.IsDefined())
                {
                    compl = false;
                }
                else
                {
                    iNS += dscore.Score.NS;
                    iEW += dscore.Score.EW;
                }
            }

            TotalScore.SetScore(iNS, iEW, compl);
        }