Added method to NoteData to get number of mines at given row.

This commit is contained in:
Michael Votaw
2025-02-11 19:39:03 -08:00
committed by teejusb
parent 28270cee31
commit 10a4a972b0
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -545,6 +545,17 @@ int NoteData::GetNumRowsWithTap( int iStartIndex, int iEndIndex ) const
return iNumNotes;
}
int NoteData::GetNumMinesInRow(int iRow) const
{
int iNumMines = 0;
for( int t=0; t<GetNumTracks(); t++ )
{
if (this->IsMine(GetTapNote(t, iRow), iRow))
iNumMines++;
}
return iNumMines;
}
int NoteData::GetNumMines( int iStartIndex, int iEndIndex ) const
{
int iNumMines = 0;
+2 -1
View File
@@ -310,7 +310,8 @@ public:
int GetNumTapNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumTapNotesNoTiming( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumTapNotesInRow( int iRow ) const;
int GetNumMines( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumMinesInRow( int iRow ) const;
int GetNumMines( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumRowsWithTap( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
int GetNumRowsWithTapOrHoldHead( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
/* Optimization: for the default of start to end, use the second (faster). XXX: Second what? -- Steve */