root/trunk/consolemain.c

Revision 28, 1.0 KB (checked in by mike, 5 years ago)

Fixed newline Characters

Line 
1/*
2 * Copyright (C) 2007 Michael Lewis
3 * Author: Mike Lewis <mikelikespie@gmail.com>
4 *
5 * This work is provide AS IS, and has no warranty.
6 * The author is NOT responsible for anything that happens
7 * due to use of this code, either using it or running it on
8 * your system
9 */
10
11#ifdef __SSE2__
12#include <xmmintrin.h>
13#include <emmintrin.h>
14#endif
15
16#include <stdlib.h>
17#include <stdio.h>
18
19#include "types.h"
20#include "helpers.h"
21#include "block.h"
22
23
24int main() {
25    life_block *origin = allocate_block();
26    if( !origin ) {
27        fprintf( stderr, "Allocation failed\n" );
28        fflush( stderr );
29        exit( 1 );
30    }
31
32    set_bit_in_block( origin, 100, 62 );
33    set_bit_in_block( origin, 98, 63 );
34    set_bit_in_block( origin, 100, 63 );
35    set_bit_in_block( origin, 100, 64 );
36    set_bit_in_block( origin, 99, 64 );
37
38
39
40        print_life_block( origin );
41        usleep( 200000 );
42   
43    int i;
44    for( i = 0; i < 50; i++ ) {
45        cycle_block( origin, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL );
46        print_life_block( origin );
47        printf( "\n" );
48        usleep( 200000 );
49    }
50    free_block( origin );
51    return 0;   
52}
Note: See TracBrowser for help on using the browser.