Cleanup
This commit is contained in:
parent
1c09678635
commit
f9187c3b28
33
src/worker.c
33
src/worker.c
|
@ -52,38 +52,7 @@ static void *WorkerMain(void *worker)
|
||||||
|
|
||||||
int size = args->globalDrawingSpace->size;
|
int size = args->globalDrawingSpace->size;
|
||||||
|
|
||||||
/* In each cell: the West (left) site is 0, the East (right) site is 1 */
|
// TODO execute rule comparison
|
||||||
for (int orig=0; orig < size; orig++){
|
|
||||||
int nxt1 = (orig + 1) % size,
|
|
||||||
nxt2 = (orig + 2) % size,
|
|
||||||
prv1 = (orig - 1 + size) % size;
|
|
||||||
|
|
||||||
if(
|
|
||||||
args->globalDrawingSpace->space[orig].sites[1].nArrow == 1
|
|
||||||
&& args->globalDrawingSpace->space[nxt2].sites[0].nArrow == 0
|
|
||||||
|
|
||||||
) {
|
|
||||||
args->globalDrawingSpace->space[orig].sites[1].nArrow = 0;
|
|
||||||
args->globalDrawingSpace->space[nxt1].sites[0].nArrow = 0;
|
|
||||||
args->globalDrawingSpace->space[nxt1].sites[1].nArrow = 1;
|
|
||||||
args->globalDrawingSpace->space[nxt2].sites[0].nArrow = 1;
|
|
||||||
|
|
||||||
/* TODO args->arrowArray->array[1].siteId = 0;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
else if(
|
|
||||||
args->globalDrawingSpace->space[orig].sites[1].nArrow == 1
|
|
||||||
&& args->globalDrawingSpace->space[prv1].sites[0].nArrow == 0
|
|
||||||
|
|
||||||
) {
|
|
||||||
args->globalDrawingSpace->space[orig].sites[1].nArrow = 0;
|
|
||||||
args->globalDrawingSpace->space[nxt1].sites[0].nArrow = 0;
|
|
||||||
args->globalDrawingSpace->space[orig].sites[0].nArrow = 1;
|
|
||||||
args->globalDrawingSpace->space[prv1].sites[1].nArrow = 1;
|
|
||||||
|
|
||||||
/* TODO args->arrowArray->array[1].siteId = 0;*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
args->returnValue = a;
|
args->returnValue = a;
|
||||||
args->terminated = true;
|
args->terminated = true;
|
||||||
|
|
Loading…
Reference in New Issue