예제 #1
0
/** \return earned rating for 'p' player. i.e. the sum of
 *          earned points per each match.
 */
double Group::earnedRating( Player p ) const
{
  double total = 0.0;
  for ( int i = 0; i < _matches.count(); i++) {
    Match m = _matches.at( i );

    if ( m.participated( p ) && m.played() ) {
      total += m.earnedRating( p );
    }
  }

  return total;
}
예제 #2
0
MatchList Group::playedMatchList( Player p ) const
{
  MatchList ml;

  for ( int i = 0; i < _matches.count(); i ++ ) { 
    Match m = _matches.at( i );

    if ( ( m.playerA() == p ) || ( m.playerB() == p ) ) {
      if ( m.played() ) {
        ml << m;
      }
    } 
  }
 
  return ml; 
}