1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2025-07-14 10:19:23 +00:00

Swag matrice en SDL

This commit is contained in:
2016-12-28 21:39:42 +01:00
parent 5ce36a2607
commit bededa78c2
7 changed files with 94 additions and 66 deletions

View File

@ -14,8 +14,6 @@ cellElement * CreateCellElem(){
return NULL;
}
printf("---Created cellElement---\n");
elem->nextCol = NULL;
elem->nextRow = NULL;
@ -62,8 +60,6 @@ int AddNextCol(cellElement* tree){
cellElement * elem = NULL;
printf("---insertNextCol---\n");
elem = CreateCellElem();
if (elem == NULL){
@ -78,8 +74,6 @@ int AddNextRow(cellElement* tree){
cellElement * elem = NULL;
printf("---insertNextRow---\n");
elem = CreateCellElem();
if (elem == NULL){
@ -90,7 +84,6 @@ int AddNextRow(cellElement* tree){
}
void removeNextCol(cellElement* tree){
printf("---removeNextCol---\n");
if (tree->nextCol != NULL){
free(tree->nextCol);
@ -100,7 +93,6 @@ void removeNextCol(cellElement* tree){
}
void removeNextRow(cellElement* tree){
printf("---removeNextRow---\n");
if (tree->nextRow != NULL){
free(tree->nextRow);
@ -127,8 +119,6 @@ void recursivePrint(cellElement * tree){
void FreeCellElement(cellElement* element) {
printf("---FreeCellElement---\n");
if (element != NULL){
free(element);
}else{

View File

@ -299,8 +299,6 @@ Matrix freeMatrix(Matrix matrix){
int i = 0;
int j = 0;
printf("\n---FREE MATRIX---\n");
for (i=0;i<matrix.rowCount;i++){
for (j=0;j<matrix.colCount;j++){
@ -311,7 +309,6 @@ Matrix freeMatrix(Matrix matrix){
}
printf("---END OF MATRIX---\n\n");
FreeList(matrix.cols);
FreeList(matrix.rows);
return matrix;
@ -536,11 +533,11 @@ bool rightRule(Matrix m, int ColPos, int RowPos){
}
bool topRule(Matrix m, int ColPos, int RowPos){
return ErrorToFalse(GetCellValue(m, ColPos, RowPos -1));
return ErrorToFalse(GetCellValue(m, ColPos, RowPos + 1));
}
bool bottomRule(Matrix m, int ColPos, int RowPos){
return ErrorToFalse(GetCellValue(m, ColPos, RowPos + 1));
return ErrorToFalse(GetCellValue(m, ColPos, RowPos - 1));
}
bool top_leftRule(Matrix m, int ColPos, int RowPos){