CMagic120Cell::CMagic120Cell() : CPuzzle( 120, 63 ) { generateCells(); fillLayerMap( m_layerMap ); fillLayerMap( m_layerMapLogical ); fillHypercubeMap(); fillAdjacentInfo(); generate4Cube(); }
Environment::Environment(int size, int blockRate, bool Agent) { gridSize = size; blockGridRate = blockRate; generateCells(); if( !Agent ) generateGrid(); }
int main() { generateCells(nCol, nRow, buffer[0]); pthread_t thread1, thread2; if (pthread_create(&thread1, NULL, life_thread, NULL) != 0) { return THREAD_CREATE_ERR; } if (pthread_create(&thread2, NULL, print_thread, NULL) != 0) { return THREAD_CREATE_ERR; } if (pthread_join(thread1, NULL) != 0) { return THREAD_JOIN_ERR; } if (pthread_join(thread2, NULL) != 0) { return THREAD_JOIN_ERR; } return 0; }