Class Juego

java.lang.Object
  extended by Juego

public class Juego
extends Object

Control del juego. Monta los paneles y maneja los eventos de tiempo y teclas.

Basado en la obra de Per Cederberg, per@percederberg.net

Version:
20.12.2010
Author:
Laboratorio de programacion

Constructor Summary
Juego()
           
Juego(int ancho, int alto)
           
 
Method Summary
 JComponent getPanelJuego()
           
(package private)  void handleKeyEvent(KeyEvent e)
          Handles a keyboard event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Juego

public Juego()

Juego

public Juego(int ancho,
             int alto)
Method Detail

getPanelJuego

public JComponent getPanelJuego()

handleKeyEvent

void handleKeyEvent(KeyEvent e)
Handles a keyboard event. This will result in different actions being taken, depending on the key pressed. In some cases, other events will be launched. This method is synchronized to avoid race conditions with other asynchronous events (timer and mouse).

Parameters:
e - the key event