Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boo = method(args...).getVAlue();
- public class PcThinkAnswer {
- private int direction;
- private int mapIndex;
- private int turnIndexH;
- private int turnIndexV;
- private boolean isAttack;
- private boolean isDefense;
- public int getDirection() { return direction; }
- public void setDirection(int direction) { this.direction = direction; }
- public int getMapIndex() { return mapIndex;}
- public void setMapIndex(int mapIndex) {this.mapIndex = mapIndex; }
- public int getTurnIndexH() { return turnIndexH; }
- public void setTurnIndexH(int turnIndexH) { this.turnIndexH = turnIndexH; }
- public int getTurnIndexV() { return turnIndexV; }
- public void setTurnIndexV(int turnIndexV) { this.turnIndexV = turnIndexV; }
- public boolean getIsAttack() { return isAttack; }
- public void setIsAttack(boolean attack) { isAttack = attack; }
- public boolean getIsDefense() { return isDefense; }
- public void setIsDefense(boolean defense) { isDefense = defense; }
- }
- private void pcTurn(PcThinkAnswer think) {
- if (think.getDirection() == 0) {
- think.setMapIndex(convertVHtoIndex(think.getTurnIndexV(), think.getTurnIndexH()));
- pcSetSymbol(think.getMapIndex(), think.getTurnIndexH(), think.getTurnIndexV());
- } else {
- think.setMapIndex(convertVHtoIndex(think.getTurnIndexH(), think.getTurnIndexV()));
- pcSetSymbol(think.getMapIndex(), think.getTurnIndexV(), think.getTurnIndexH());
- }
- }
- private PcThinkAnswer toThink(String symbol) {
- PcThinkAnswer thinkAnswer = new PcThinkAnswer(); // a object
- boolean isDefense = false; // vars
- boolean isAttack = false;
- int turnIndexH = 0;
- int turnIndexV = 0;
- int mapIndex = 0;
- int direction = 0;
- int directionFactor = 1;
- // ... some code
- // ...
- // ...
- thinkAnswer.setIsAttack(isAttack); // write to object
- thinkAnswer.setIsDefense(isDefense);
- thinkAnswer.setMapIndex(mapIndex);
- thinkAnswer.setTurnIndexH(turnIndexH);
- thinkAnswer.setTurnIndexV(turnIndexV);
- thinkAnswer.setDirection(direction);
- return thinkAnswer;
- }
Add Comment
Please, Sign In to add comment