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
|
|
|
**********************************************************************************/
|
|
|
|
|
2016-12-28 20:39:42 +00:00
|
|
|
#include <SDL2/SDL.h>
|
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-28 20:39:42 +00:00
|
|
|
#include <pixel.h>
|
2016-12-10 20:11:46 +00:00
|
|
|
|
2016-12-28 20:39:42 +00:00
|
|
|
int main(){
|
|
|
|
Matrix m1 = CreateMatrix();
|
|
|
|
int rules[] = {2, 32, 8, 128};
|
2016-12-26 19:44:39 +00:00
|
|
|
Matrix m2;
|
2016-12-28 20:39:42 +00:00
|
|
|
BooleanMatrix bmatrix = CreateBooleanMatrix(300, 300);
|
2016-12-26 19:44:39 +00:00
|
|
|
|
2016-12-28 20:39:42 +00:00
|
|
|
bmatrix = RandomizeBooleanMatrix(bmatrix);
|
|
|
|
m1 = newMatrix(bmatrix);
|
|
|
|
FreeBooleanMatrix(bmatrix);
|
2016-12-27 21:26:06 +00:00
|
|
|
|
2016-12-28 22:59:43 +00:00
|
|
|
NewWindowFromMatrix(m1);
|
2016-12-28 20:39:42 +00:00
|
|
|
|
|
|
|
m2 = matrixFromRules(m1, 4, rules);
|
|
|
|
freeMatrix(m1);
|
2016-12-26 19:44:39 +00:00
|
|
|
freeMatrix(m2);
|
2016-12-24 15:07:50 +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
|
|
|
}
|