| MonsterChangeException.java |
1 /**
2 * Defines an Exception if the Opponent in Battle/BattleAI
3 * wishes to change Monsters.
4 *
5 * @see Battle
6 * @see BattleAI
7 * @see Monster
8 * @author Matt, Sam
9 * @version 1234
10 */
11 public class MonsterChangeException extends Exception
12 {
13 private int originalMonster;
14 private int newMonster;
15 /**
16 * Simple constructor for MonsterChangeException
17 *
18 * @param originalMonster the position of the Monster to take out of active status
19 * @param newMonster the position of the Monster to put in active status
20 */
21 public MonsterChangeException(int originalMonster, int newMonster)
22 {
23 this.originalMonster = originalMonster;
24 this.newMonster = newMonster;
25 }
26 /**
27 * Gets the position of the Original Monster
28 *
29 * @return the position of the originial Monster.
30 */
31 public int getOriginalMonster()
32 {
33 return originalMonster;
34 }
35 /**
36 * Gets the position of the New Monster
37 *
38 * @return the position of the new Monster.
39 */
40 public int getNewMonster()
41 {
42 return newMonster;
43 }
44 }