/* * 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 */ #ifndef _BLOCK_H_INCLUDED #define _BLOCK_H_INCLUDED void cycle_block( llife_block block, llife_block tl, llife_block t, llife_block tr, llife_block l, llife_block r, llife_block bl, llife_block b, llife_block br ); static inline llife_block get_life_block( llife_world world, int row, int column ) { return world->blocks[ (row*world->width + column) ]; } llife_world allocate_world( int height, int width ); void free_world( llife_world world ); void worldCycle( llife_world world ); //returns NULL if fail; life_block *allocate_block(); void free_block( life_block *block ); void set_bit_in_world( llife_world world, int row, int column ); #endif //_BLOCK_H_INCLUDED