2016-12-10 01:28:10 +00:00
|
|
|
/*********************************************************************************
|
|
|
|
* File Name : main.c
|
|
|
|
* Created By : klmp200
|
|
|
|
* Creation Date : [2016-12-10 01:06]
|
|
|
|
* Last Modified : [2016-12-10 01:07]
|
2016-12-10 20:11:46 +00:00
|
|
|
* Description :
|
2016-12-10 01:28:10 +00:00
|
|
|
**********************************************************************************/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2016-12-13 14:12:55 +00:00
|
|
|
#include <matrix.h>
|
2016-12-10 20:11:46 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv){
|
2016-12-13 16:28:13 +00:00
|
|
|
Matrix matrix = CreateMatrix();
|
2016-12-13 14:55:42 +00:00
|
|
|
int Rule = 170;
|
|
|
|
int N = 1;
|
2016-12-13 14:12:55 +00:00
|
|
|
applyRules(matrix,Rule,N);
|
2016-12-13 14:55:42 +00:00
|
|
|
/*
|
|
|
|
Matrix matrix;
|
2016-12-10 20:11:46 +00:00
|
|
|
cellElement * tree = NULL;
|
2016-12-13 14:55:42 +00:00
|
|
|
List * cols = NULL;
|
|
|
|
List * rows = NULL;
|
|
|
|
|
|
|
|
cols = CreateList();
|
|
|
|
rows = CreateList();
|
|
|
|
|
2016-12-11 02:25:21 +00:00
|
|
|
|
2016-12-10 20:11:46 +00:00
|
|
|
tree = CreateCellElem();
|
2016-12-11 02:25:21 +00:00
|
|
|
SetPositionIndex(tree,1,1);
|
|
|
|
|
2016-12-10 20:11:46 +00:00
|
|
|
AddNextRow(tree);
|
2016-12-11 02:25:21 +00:00
|
|
|
SetPositionIndex(tree->nextRow,1,2);
|
|
|
|
|
2016-12-10 20:11:46 +00:00
|
|
|
AddNextCol(tree);
|
2016-12-11 02:25:21 +00:00
|
|
|
SetPositionIndex(tree->nextCol,1,3);
|
|
|
|
|
2016-12-11 03:01:27 +00:00
|
|
|
SetNextRow(tree->nextCol,tree->nextRow);
|
|
|
|
|
2016-12-10 20:11:46 +00:00
|
|
|
recursivePrint(tree);
|
2016-12-11 02:25:21 +00:00
|
|
|
|
|
|
|
|
2016-12-10 20:11:46 +00:00
|
|
|
removeNextRow(tree);
|
|
|
|
removeNextCol(tree);
|
|
|
|
|
2016-12-11 02:25:21 +00:00
|
|
|
recursivePrint(tree);
|
2016-12-13 14:55:42 +00:00
|
|
|
*/
|
2016-12-10 01:28:10 +00:00
|
|
|
return 0;
|
2016-12-10 20:11:46 +00:00
|
|
|
|
2016-12-10 01:28:10 +00:00
|
|
|
}
|