Simplify.

This commit is contained in:
Steve Checkoway
2006-07-21 08:01:28 +00:00
parent c299a7a4f7
commit 9f1bb1e16f
2 changed files with 79 additions and 101 deletions
+4 -10
View File
@@ -62,19 +62,13 @@ int GetNumHoldNotesWithScore( const NoteData &in, TapNote::SubType subType, Hold
return iNumSuccessfulHolds;
}
bool AvoidedMines( const TapNote &tn ) { return tn.type == TapNote::mine && tn.result.tns == TNS_AvoidMine; }
int GetSuccessfulMines( const NoteData &in, int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW )
{
int iNumSuccessfulMinesNotes = 0;
FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE( in, i, iStartIndex, iEndIndex )
{
for( int t=0; t<in.GetNumTracks(); t++ )
{
const TapNote &tn = in.GetTapNote(t,i);
if( tn.type == TapNote::mine && tn.result.tns == TNS_AvoidMine )
iNumSuccessfulMinesNotes++;
}
}
NoteData::all_tracks_const_iterator iter = in.GetTapNoteRangeAllTracks( iStartIndex, iEndIndex, AvoidedMines );
for( ; !iter.IsAtEnd(); ++iter )
++iNumSuccessfulMinesNotes;
return iNumSuccessfulMinesNotes;
}