/** * File: Project4.java * Author: J. Tang * * This file contains the main starting point for "Ants Versus Zombies". * * DO NOT edit this file. * DO NOT submit this file. * */ package proj4; import java.io.*; import javax.swing.*; public class Project4 { public static void main(String args[]) { GameInterface game = new Game(); File f = new File("."); String lastFilename = f.getAbsolutePath(); while (!game.isGameOver()) { new RecruitDialog(game); JFileChooser fc = new JFileChooser(lastFilename); int returnVal = fc.showOpenDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION) { lastFilename = fc.getSelectedFile().getAbsolutePath(); game.readHordeFile(lastFilename); } else { System.exit(0); } new InvasionDialog(game); } JOptionPane.showMessageDialog(null, game.getEndingMessage(), "Ants Versus Zombies", JOptionPane.INFORMATION_MESSAGE); } }