import java.util.*; import java.io.*; /** * CS1322: Programming Assignment #6 - Fall 2002 * *
* IDBox for: PacmanFileReader.java * * Revisions: 1.0 Nov. 23, 2002 * Created the PacmanFileReader class * ** * Collaboration statement: * "I worked on the homework assignment alone, using only * course materials." * * @author Roland Krystian Alberciak * @version Version 1.0, Nov. 23, 2002 */ // imports are listed above IDBox public class PacmanFileReader { /** Debug value for toggling System.out.* output */ public static boolean DEBUG = false; public static boolean DEBUG_CODE = false; public static boolean DEBUG_MAIN = false; /* // ======================================================================= // Constructors // ======================================================================= */ /** * Constructor 1. Specified default-overriding constructor for PacmanFileReader. * @param void No parameters. * @return PacmanFileReader instance/object. * public PacmanFileReader() { } //end of PacmanFileReader() */ /** * Constructor 2. Specified default-overloading constructor for PacmanFileReader. * @param file_name a String file name of a board file * @return PacmanFileReader instance/object. */ public PacmanFileReader(String file_name) { ghosts = new Ghost[4]; //0->1, 1->2, 2->3, 3->4 this.FILE_NAME=file_name; pieceArray=new GamePiece[15][15]; read_5_lines(); read_15_lines(); } //end of PacmanFileReader(String) /* // ======================================================================= // Methods which override class Object methods // ======================================================================= */ /** * Equal instance comparison. Compares if two instances are equal. * @param o object-type reference of (hopefully) an PacmanFileReader. * @return boolean whether objects are equal. * public boolean equals (Object o) { } //end of equals(Object) */ /** * toString instance printer. Prints properties of PacmanFileReader. * @return System.out.println(PacmanFileReader instance) instance print. */ public String toString() { String result=""; result= result+pacman.toString()+"\n"; //gets toString of Pacman. for (int i=0; i