mirror of
https://gitlab.com/klmp200/LO27.git
synced 2025-07-11 15:49:23 +00:00
Renommage complet des fonctions
This commit is contained in:
22
matrixmain.c
22
matrixmain.c
@ -37,31 +37,31 @@ int main(){
|
||||
Matrix m2;
|
||||
BooleanMatrix bmatrix;
|
||||
|
||||
useSDL = YesOrNo("Do you want to use SDL library for matrix display ?");
|
||||
useSDL = inputYesOrNo("Do you want to use SDL library for matrix display ?");
|
||||
printf("A random matrix will be generated\n");
|
||||
printf("Enter the number of columns of this matrix\n");
|
||||
col = SafeNumberInput(1, 30000);
|
||||
col = safeNumberInput(1, 30000);
|
||||
printf("Enter the number of rows of this matrix\n");
|
||||
row = SafeNumberInput(1, 30000);
|
||||
bmatrix = CreateBooleanMatrix(col, row);
|
||||
row = safeNumberInput(1, 30000);
|
||||
bmatrix = createBooleanMatrix(col, row);
|
||||
|
||||
bmatrix = RandomizeBooleanMatrix(bmatrix);
|
||||
bmatrix = randomizeBooleanMatrix(bmatrix);
|
||||
m1 = newMatrix(bmatrix);
|
||||
FreeBooleanMatrix(bmatrix);
|
||||
freeBooleanMatrix(bmatrix);
|
||||
|
||||
DisplayMatrixGUI(m1, useSDL);
|
||||
displayMatrixGUI(m1, useSDL);
|
||||
|
||||
while (cont){
|
||||
printf("What rule do you want to apply to this matrix ?\n");
|
||||
rule = SafeNumberInput(1, 481);
|
||||
rule = safeNumberInput(1, 481);
|
||||
printf("How many times do you want the rule to be applied ?\n");
|
||||
times = SafeNumberInput(1, 100000);
|
||||
times = safeNumberInput(1, 100000);
|
||||
m2 = applyRules(m1,rule,times);
|
||||
freeMatrix(m1);
|
||||
|
||||
DisplayMatrixGUI(m2, useSDL);
|
||||
displayMatrixGUI(m2, useSDL);
|
||||
|
||||
cont = YesOrNo("Do you want to apply other rules on this matrix ?");
|
||||
cont = inputYesOrNo("Do you want to apply other rules on this matrix ?");
|
||||
m1 = m2;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user