Added method to NoteData to get number of mines at given row.
This commit is contained in:
@@ -545,6 +545,17 @@ int NoteData::GetNumRowsWithTap( int iStartIndex, int iEndIndex ) const
|
|||||||
return iNumNotes;
|
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 NoteData::GetNumMines( int iStartIndex, int iEndIndex ) const
|
||||||
{
|
{
|
||||||
int iNumMines = 0;
|
int iNumMines = 0;
|
||||||
|
|||||||
+2
-1
@@ -310,7 +310,8 @@ public:
|
|||||||
int GetNumTapNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
int GetNumTapNotes( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
int GetNumTapNotesNoTiming( 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 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 GetNumRowsWithTap( int iStartIndex = 0, int iEndIndex = MAX_NOTE_ROW ) const;
|
||||||
int GetNumRowsWithTapOrHoldHead( 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 */
|
/* Optimization: for the default of start to end, use the second (faster). XXX: Second what? -- Steve */
|
||||||
|
|||||||
Reference in New Issue
Block a user