package mug12; import java.util.Vector; import java.util.Random; import java.util.Hashtable; public class CrazyPerson extends Person { public CrazyPerson(String _name, String _description, String _sex, String _major, Hashtable _verbs, Hashtable _attributes, Vector _inventory) { super(_name,_description,_sex,_major,_verbs,_attributes,_inventory); } public String[] randomness(String[] _interactable) { Random num = new Random(); // get array of stuff in room we can interact with // for now just using this empty one int index = num.nextInt(_interactable.length); String target = _interactable[index]; // get array of the methods we can interact with // somewhere there should be an array of the methods that can be performed on a given object String[] test2 = {"null"}; int index2 = num.nextInt(test2.length); String method = test2[index2]; String[] results = { target, method }; return results; } }