This commit is contained in:
Adrien Bourmault 2021-10-14 09:11:12 +02:00
parent 1c09678635
commit f9187c3b28
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
1 changed files with 1 additions and 32 deletions

View File

@ -52,38 +52,7 @@ static void *WorkerMain(void *worker)
int size = args->globalDrawingSpace->size;
/* In each cell: the West (left) site is 0, the East (right) site is 1 */
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;*/
}
}
// TODO execute rule comparison
args->returnValue = a;
args->terminated = true;