1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-05 08:38:03 +00:00
LO27/matrixmain.c
2016-12-29 01:40:50 +01:00

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;
}