// CSE 142 Summer 2008, Helene Martin // // You can write your own classes for testing Critters. // That way, you get feedback on the console. public class Test { public static void main(String[] args) { // Create an object Snake s = new Snake(); // This is especially useful for testing the fight method System.out.println(s.fight("Snake")); System.out.println(s.fight("Bob")); for(int i = 0; i < 10; i++) { System.out.print(s.getMove() + " "); } System.out.println(); // Create an object. DrunkenFratGuy bob = new DrunkenFratGuy(); System.out.println(bob.fight("Tiger")); System.out.println(bob.getMove()); } }