mirror of
https://gitlab.com/klmp200/LO27.git
synced 2024-12-22 17:51:08 +00:00
added something
This commit is contained in:
parent
ec0f959f5e
commit
1735a21274
@ -665,3 +665,26 @@ bool equalsMatrix(Matrix m1, Matrix m2){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void setRowToTrue(Matrix matrix, int RowNb){
|
||||
int i =0;
|
||||
for (i=0;i<m2.colCount;i++){
|
||||
setCellValue(matrix,i,RowNb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void setColToTrue(Matrix matrix, int ColNb){
|
||||
int i =0;
|
||||
for (i=0;i<m2.rowCount;i++){
|
||||
setCellValue(matrix,ColNb,i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void createSquare(Matrix matrix){
|
||||
setRowToTrue(matrix,rowCount/4);
|
||||
setRowToTrue(matrix,rowCount*3/4);
|
||||
setColToTrue(matrix,colCount/4);
|
||||
setColToTrue(matrix,colCount*3/4);
|
||||
}
|
@ -490,5 +490,31 @@ bool isColumnEmpty(Matrix matrix,int nb);
|
||||
*/
|
||||
bool isRowEmpty(Matrix matrix,int nb);
|
||||
|
||||
|
||||
/**
|
||||
* Sets a Row to true
|
||||
*
|
||||
* @param matrix a Matrix
|
||||
* @param RowNb int number of the row
|
||||
*/
|
||||
void setRowToTrue(Matrix matrix, int RowNb);
|
||||
|
||||
|
||||
/**
|
||||
* Sets a Col to true
|
||||
*
|
||||
* @param matrix a Matrix
|
||||
* @param ColNb int nuber of the col
|
||||
*/
|
||||
void setColToTrue(Matrix matrix, int ColNb);
|
||||
|
||||
/**
|
||||
* Sets some values to true to create a square in the matrix
|
||||
*
|
||||
* @param matrix a Matrix
|
||||
*/
|
||||
void createSquare(Matrix matrix);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user