1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-12-22 22:11:09 +00:00

added something

This commit is contained in:
Naej 2017-01-02 00:52:39 +01:00
parent d408036d04
commit 0d8b47d49a
2 changed files with 49 additions and 0 deletions

View File

@ -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);
}

View File

@ -494,5 +494,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