Guest User

Untitled

a guest
Dec 7th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. boo = method(args...).getVAlue();
  2.  
  3. public class PcThinkAnswer {
  4. private int direction;
  5. private int mapIndex;
  6. private int turnIndexH;
  7. private int turnIndexV;
  8. private boolean isAttack;
  9. private boolean isDefense;
  10.  
  11. public int getDirection() { return direction; }
  12. public void setDirection(int direction) { this.direction = direction; }
  13.  
  14. public int getMapIndex() { return mapIndex;}
  15. public void setMapIndex(int mapIndex) {this.mapIndex = mapIndex; }
  16.  
  17. public int getTurnIndexH() { return turnIndexH; }
  18. public void setTurnIndexH(int turnIndexH) { this.turnIndexH = turnIndexH; }
  19.  
  20. public int getTurnIndexV() { return turnIndexV; }
  21. public void setTurnIndexV(int turnIndexV) { this.turnIndexV = turnIndexV; }
  22.  
  23. public boolean getIsAttack() { return isAttack; }
  24. public void setIsAttack(boolean attack) { isAttack = attack; }
  25.  
  26. public boolean getIsDefense() { return isDefense; }
  27. public void setIsDefense(boolean defense) { isDefense = defense; }
  28.  
  29. }
  30.  
  31. private void pcTurn(PcThinkAnswer think) {
  32. if (think.getDirection() == 0) {
  33. think.setMapIndex(convertVHtoIndex(think.getTurnIndexV(), think.getTurnIndexH()));
  34. pcSetSymbol(think.getMapIndex(), think.getTurnIndexH(), think.getTurnIndexV());
  35. } else {
  36. think.setMapIndex(convertVHtoIndex(think.getTurnIndexH(), think.getTurnIndexV()));
  37. pcSetSymbol(think.getMapIndex(), think.getTurnIndexV(), think.getTurnIndexH());
  38. }
  39. }
  40.  
  41. private PcThinkAnswer toThink(String symbol) {
  42. PcThinkAnswer thinkAnswer = new PcThinkAnswer(); // a object
  43.  
  44. boolean isDefense = false; // vars
  45. boolean isAttack = false;
  46. int turnIndexH = 0;
  47. int turnIndexV = 0;
  48. int mapIndex = 0;
  49. int direction = 0;
  50. int directionFactor = 1;
  51.  
  52. // ... some code
  53. // ...
  54. // ...
  55.  
  56.  
  57. thinkAnswer.setIsAttack(isAttack); // write to object
  58. thinkAnswer.setIsDefense(isDefense);
  59. thinkAnswer.setMapIndex(mapIndex);
  60. thinkAnswer.setTurnIndexH(turnIndexH);
  61. thinkAnswer.setTurnIndexV(turnIndexV);
  62. thinkAnswer.setDirection(direction);
  63.  
  64. return thinkAnswer;
  65. }
Add Comment
Please, Sign In to add comment