/* * Copyright (C) 2007 Michael Lewis * Author: Mike Lewis * * This work is provide AS IS, and has no warranty. * The author is NOT responsible for anything that happens * due to use of this code, either using it or running it on * your system */ #ifdef __SSE2__ #include #include #endif #include #include #include "types.h" #include "helpers.h" #include "block.h" int main() { life_block *origin = allocate_block(); if( !origin ) { fprintf( stderr, "Allocation failed\n" ); fflush( stderr ); exit( 1 ); } set_bit_in_block( origin, 100, 62 ); set_bit_in_block( origin, 98, 63 ); set_bit_in_block( origin, 100, 63 ); set_bit_in_block( origin, 100, 64 ); set_bit_in_block( origin, 99, 64 ); print_life_block( origin ); usleep( 200000 ); int i; for( i = 0; i < 50; i++ ) { cycle_block( origin, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); print_life_block( origin ); printf( "\n" ); usleep( 200000 ); } free_block( origin ); return 0; }