Class BattleAI

java.lang.Object
  |
  +--BattleAI

public class BattleAI
extends java.lang.Object

Simple AI to determine the best course of attack/Item use/Monster switch based on the two battling Monsters.

See Also:
Monster, Battle

Constructor Summary
BattleAI()
           
 
Method Summary
static Attack recommendMonsterAttack(Monster attacker, Monster opponent)
          Recommends the best Attack corresponding for the Monster
static Attack recommendPlayerAttack(People attacker, Player opponent)
          Recommends the best Attack corresponding for the People against the Player
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BattleAI

public BattleAI()
Method Detail

recommendMonsterAttack

public static Attack recommendMonsterAttack(Monster attacker,
                                            Monster opponent)
Recommends the best Attack corresponding for the Monster

Parameters:
attacker - the Monster attacking
opponent - the Monster defending
Returns:
the recommended Attack

recommendPlayerAttack

public static Attack recommendPlayerAttack(People attacker,
                                           Player opponent)
                                    throws ItemChangeException,
                                           MonsterChangeException
Recommends the best Attack corresponding for the People against the Player

Parameters:
attacker - the People attacking
opponent - the Player defending
Returns:
the recommended Attack
Throws:
ItemChangeException - if the best course of action is to use an Item
MonsterChangeException - if the best course of action is to switch Monsters
See Also:
Monster, People, Player, Item