LO27/matrixmain.c

41 lines
826 B
C

/*********************************************************************************
* File Name : main.c
* Created By : klmp200
* Creation Date : [2016-12-10 01:06]
* Last Modified : [2016-12-10 01:07]
* Description :
**********************************************************************************/
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>
#include <matrix.h>
#include <pixel.h>
int main(){
int Rule34 = 3;
Matrix m1;
Matrix m2;
BooleanMatrix bmatrix = CreateBooleanMatrix(5, 5);
bmatrix = RandomizeBooleanMatrix(bmatrix);
m1 = newMatrix(bmatrix);
FreeBooleanMatrix(bmatrix);
NewWindowFromMatrix(m1);
m2 = applyRules(m1,Rule34,3);
NewWindowFromMatrix(m2);
freeMatrix(m1);
freeMatrix(m2);
return 0;
}