game

Class PlayGame

Implemented Interfaces:
ActionListener, ItemListener, ListSelectionListener, Transport

public class PlayGame
extends JApplet
implements ActionListener, Transport, ItemListener, ListSelectionListener

This class provides the GUI interfacing between the user and the machine It uses the swing functionality to provide a good interfacing
Version:
2.4 (19-APR-2010)
Author:
Shashi Mittal

Field Summary

static Font
font

Fields inherited from interface game.Transport

BLACK, BUS, FERRY, INF, NONE, TAXI, UG

Method Summary

void
actionPerformed(ActionEvent ae)
This method is used to handle the events caused by the clicking of the buttons.
void
itemStateChanged(ItemEvent ie)
Called when the item in the JComboBox is changed
static void
main(args[] )
This is the main method.
@Override
void valueChanged(ListSelectionEvent evt)
This method displays the previous positions of the detectives and Mr.

Field Details

font

public static Font font

Method Details

actionPerformed

public void actionPerformed(ActionEvent ae)
This method is used to handle the events caused by the clicking of the buttons.
Parameters:
ae - the ActionEvent object which has the details of the event.

itemStateChanged

public void itemStateChanged(ItemEvent ie)
Called when the item in the JComboBox is changed
Parameters:
ie - the ItemEvent object which has the details of this event

main

public static void main(args[] )
This is the main method. Called when run as an application.

void valueChanged

public @Override void valueChanged(ListSelectionEvent evt)
This method displays the previous positions of the detectives and Mr. X on the map after the game is over.