Advertisement
Guest User

Untitled

a guest
Oct 6th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. public boolean SteinInt(Spielstein[] s, Position[] P, ESpielsteinfarbe F,Strategie KI,boolean[] bl, int M){
  2. if(bl[3]==false&&bl[6]==false&&bl[21]==false&&bl[27]==false&&bl[42]==false&&bl[45]==false&&bl[48]==false){
  3. if(bl[0]==false){
  4. KI.setS(0);
  5. return true;
  6. }
  7. for(int i=0; i<18; i++){
  8. if(bl[0]==true&&s[i].getFarbe()==F&&P[i].getebene()==Null&&P[i].getx()==Null&&P[i].gety()==Null){
  9. KI.setS(48);
  10. return true;
  11. }
  12. }
  13. }
  14. if(bl[21]==false&&bl[42]==false&&bl[45]==false){
  15. KI.setS(42);
  16. return true;
  17. }
  18. if(bl[3]==false&&bl[6]==false&&bl[27]==false){
  19. KI.setS(6);
  20. return true;
  21. }
  22.  
  23. //16,17,18,25,32,31,30,23
  24. if(bl[17]==false&&bl[18]==false&&bl[23]==false&&bl[25]==false&&bl[30]==false&&bl[31]==false&&bl[32]==false){
  25. if(bl[16]==false){
  26. KI.setS(16);
  27. return true;
  28. }
  29. for(int i=0; i<18; i++){
  30. if(bl[16]==true&&s[i].getFarbe()==F&&P[i].getebene()==Null&&P[i].getx()==Null&&P[i].gety()==Null){
  31. KI.setS(32);
  32. return true;
  33. }
  34. }
  35. }
  36. if(bl[17]==false&&bl[18]==false&&bl[25]==false){
  37. KI.setS(18);
  38. return true;
  39. }
  40. if(bl[23]==false&&bl[30]==false&&bl[31]==false){
  41. KI.setS(30);
  42. return true;
  43. }
  44.  
  45. if(M==3){
  46. KI.setS(-3);
  47. return false;
  48. }
  49. return false;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement