import edu.kzoo.grid.display.DisplayMap;
import edu.kzoo.grid.display.ScaledImageDisplay;
import edu.kzoo.grid.gui.GridPkgFactory;
// Class ObstacleRaceApp
//
// Author: Alyce Brady
//
// This class is based on the College Board's MBSGUI class,
// as allowed by the GNU General Public License. MBSGUI
// is a black-box class within the AP(r) CS Marine Biology Simulation
// case study (see www.collegeboard.com/ap/students/compsci).
//
// License Information:
// This class is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation.
//
// This class is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
/**
* Obstacle Course Program:
*
* The ObstacleRaceApp class provides a main method
* for a version of the Obstacle Course program with a graphical
* user interface.
*
* @author Alyce Brady
* @version 1 December 2002
* @see DisplayMap
* @see GridPkgFactory
* @see ObstCourseWindow
* @see ScaledImageDisplay
**/
public class ObstacleRaceApp
{
/** Start the Obstacle Course program.
* The String arguments (args) are not used in this application.
**/
public static void main(String[] args)
{
// Specify which types of objects can be placed in the grid.
// This array is used to provide a choice of object types in the
// pull-down menu when manually placing objects into the grid.
// String[] racerTypes = {"SimpleRacer", "RandomRacer"};
// GridPkgFactory.addGridObjClassNames(racerTypes);
// Specify classes that know how to draw various grid objects;
// in other words, map grid object classes (like SimpleRacer) to
// display objects (like RacerDisplay or ScaledImageDisplay objects).
DisplayMap.associate("Obstacle",
new ScaledImageDisplay("images/Island.jpg"));
DisplayMap.associate("AbstractRacer",
new ScaledImageDisplay("images/Windsurfer.jpg"));
// Create and show the window containing the graphical user interface.
ObstCourseWindow windowFrame = new ObstCourseWindow();
}
}