exkappa

Untitled

Dec 10th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. public void updateDomains(Tile t1, Tile t2){
  3. int n = t1.domain.size();
  4. for(int value:t1.domain.domain){
  5. t1.setValue(value);
  6. for(int t2.x = 0; t2.x < size; t2.x++) {
  7. for (int t2.y = 0; t2.y < size; t2.y++) {
  8. if (t2.x != t1.x || t2.y != t1.y) {
  9. for (int k = 1; k < n; k++) {
  10. t1.setValue(k);
  11. if (!con.checkconsistency(t1, t2))
  12. t1.domain.deleteElement(k);
  13. }
  14. }
  15. }
  16. }
  17. t1.setValue(null);
  18. t2.setValue(null);
  19. if(n == 0)
  20. t2.domain.deleteElement(value);
  21.  
  22. }
  23.  
  24. }
Add Comment
Please, Sign In to add comment