working on mine logic

This commit is contained in:
Chris Danford
2003-08-10 19:07:54 +00:00
parent 9e9eac516f
commit 0a03681825
2 changed files with 55 additions and 23 deletions
+7 -2
View File
@@ -107,6 +107,9 @@ TapNoteScore NoteDataWithScoring::MinTapNoteScore(unsigned row) const
/* If there's no tap note on this row, skip it, or else the score will always be TNS_NONE. */
if(GetTapNote(t, row) == TAP_EMPTY)
continue;
/* Don't count mines - the goal is to miss those */
if(GetTapNote(t, row) == TAP_MINE)
continue;
score = min( score, GetTapNoteScore(t, row) );
}
@@ -127,11 +130,13 @@ int NoteDataWithScoring::LastTapNoteScoreTrack(unsigned row) const
int best_track = -1;
for( int t=0; t<GetNumTracks(); t++ )
{
/* If there's no tap note on this row, skip it; the score will always be TNS_NONE. */
/* If there's no tap note on this track, skip it (the score will always be TNS_NONE) */
if(GetTapNote(t, row) == TAP_EMPTY) continue;
TapNoteScore tns = GetTapNoteScore(t, row);
if(tns == TNS_NONE || tns == TNS_MISS) return t;
/* Ignore tracks that haven't yet been graded. */
if(tns == TNS_NONE) continue;
float tm = GetTapNoteOffset(t, row);
if(tm < scoretime) continue;