uint8_t rel_enc[12] = {0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1};
t = sylvan_union_cube(t, relvarset, rel_enc);
}
- if (tmp_scr->tile == AGENT && (tmp_scr_d->tile == BOX || tmp_scr_d->tile == TARGBOX)){
- //can't move
+ if (tmp_scr->tile == AGENT && tmp_scr_d->tile == BOX){
+ //(0 0 1 1 0 0 1 1 0 0 1 1)
+ BDDVAR relvars[12] = {deltai*3, deltai*3+1, deltai*3+2, deltai*3+3, deltai*3+4, deltai*3+5, i*3, i*3+1, i*3+2, i*3+3, i*3+4, i*3+5};
+ BDDSET relvarset = sylvan_set_fromarray(relvars, 12);
+ uint8_t rel_enc[12] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1};
+ t = sylvan_union_cube(t, relvarset, rel_enc);
}
- if (tmp_scr->tile == TARGAGENT && (tmp_scr_d->tile == BOX || tmp_scr_d->tile == TARGBOX)){
- //can't move
+ if (tmp_scr->tile == AGENT && tmp_scr_d->tile == TARGBOX){
+ //(1 1 0 0 0 0 1 1 0 0 1 1)
+ BDDVAR relvars[12] = {deltai*3, deltai*3+1, deltai*3+2, deltai*3+3, deltai*3+4, deltai*3+5, i*3, i*3+1, i*3+2, i*3+3, i*3+4, i*3+5};
+ BDDSET relvarset = sylvan_set_fromarray(relvars, 12);
+ uint8_t rel_enc[12] = {1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1};
+ t = sylvan_union_cube(t, relvarset, rel_enc);
+ }
+ if (tmp_scr->tile == TARGAGENT && tmp_scr_d->tile == BOX){
+ //(0 0 1 1 0 0 1 1 1 1 0 0)
+ BDDVAR relvars[12] = {deltai*3, deltai*3+1, deltai*3+2, deltai*3+3, deltai*3+4, deltai*3+5, i*3, i*3+1, i*3+2, i*3+3, i*3+4, i*3+5};
+ BDDSET relvarset = sylvan_set_fromarray(relvars, 12);
+ uint8_t rel_enc[12] = {0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0};
+ t = sylvan_union_cube(t, relvarset, rel_enc);
+ }
+ if (tmp_scr->tile == TARGAGENT && tmp_scr_d->tile == TARGBOX){
+ //(1 1 0 0 0 0 1 1 1 1 0 0)
+ BDDVAR relvars[12] = {deltai*3, deltai*3+1, deltai*3+2, deltai*3+3, deltai*3+4, deltai*3+5, i*3, i*3+1, i*3+2, i*3+3, i*3+4, i*3+5};
+ BDDSET relvarset = sylvan_set_fromarray(relvars, 12);
+ uint8_t rel_enc[12] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0};
+ t = sylvan_union_cube(t, relvarset, rel_enc);
}
}
else if (check_space(x, y, LEFT, 1, bm) == 1 && check_space(x, y, LEFT, 2, bm) == 1){