Class CLodeRunner

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--CLodeRunner

public class CLodeRunner
extends java.applet.Applet
implements java.awt.event.KeyListener, java.lang.Runnable

LodeRunner Game

Version:
1.0
Author:
Roman Podobedov (romka@ut.ee) - Main developer, Programmer
Vitaly Petrov (petrov@ut.ee) - Programmer
Nadezda Velikanova (nadin@ut.ee) - Additional Programming
Darja Krushevskaja (dasha@ut.ee) - Additional Programming
Alina Klunduk (maljok@ut.ee) - Additional Programming
See Also:
Serialized Form

Field Summary
protected  java.awt.Image BackBuffer
           
protected  java.awt.Graphics BackBufferGC
           
protected  int CellHeight
           
protected  int CellWidth
           
protected  boolean game_over
           
protected  int game_over_counter
           
protected  int height
           
protected  boolean ImageLoaded
           
protected  java.awt.Image[] images
           
protected  java.net.URL level_base
           
protected  int level_num
           
protected  boolean new_level
           
protected  int new_level_counter
           
protected  int width
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
CLodeRunner()
           
 
Method Summary
 void destroy()
          Applet destroy method
 boolean imageUpdate(java.awt.Image img, int infoflags, int x, int y, int w, int h)
          Image update method (here we wait while all images are loaded)
 void init()
          Applet initialization
 void keyPressed(java.awt.event.KeyEvent key_event)
          Called, when key in applet is pressed
 void keyReleased(java.awt.event.KeyEvent key_event)
          Called, when key in applet is released
 void keyTyped(java.awt.event.KeyEvent key_event)
          Called, when key in applet is typed
 void paint(java.awt.Graphics g)
          Draw method
 void ResetAllMovements()
          Reset all hero movements
 void run()
          Called, when thread is running
 void start()
          Called, when applet is started
 void stop()
          Called, when applet stopped
 void update(java.awt.Graphics g)
          Applet update method
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setCursor, setFont, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CellWidth

protected int CellWidth

CellHeight

protected int CellHeight

width

protected int width

height

protected int height

images

protected java.awt.Image[] images

BackBuffer

protected java.awt.Image BackBuffer

BackBufferGC

protected java.awt.Graphics BackBufferGC

ImageLoaded

protected boolean ImageLoaded

level_base

protected java.net.URL level_base

level_num

protected int level_num

new_level

protected boolean new_level

new_level_counter

protected int new_level_counter

game_over

protected boolean game_over

game_over_counter

protected int game_over_counter
Constructor Detail

CLodeRunner

public CLodeRunner()
Method Detail

init

public void init()
Applet initialization
Overrides:
init in class java.applet.Applet

imageUpdate

public boolean imageUpdate(java.awt.Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
Image update method (here we wait while all images are loaded)
Overrides:
imageUpdate in class java.awt.Component

destroy

public void destroy()
Applet destroy method
Overrides:
destroy in class java.applet.Applet

paint

public void paint(java.awt.Graphics g)
Draw method
Overrides:
paint in class java.awt.Container

update

public void update(java.awt.Graphics g)
Applet update method
Overrides:
update in class java.awt.Container

start

public void start()
Called, when applet is started
Overrides:
start in class java.applet.Applet

stop

public void stop()
Called, when applet stopped
Overrides:
stop in class java.applet.Applet

run

public void run()
Called, when thread is running
Specified by:
run in interface java.lang.Runnable

keyPressed

public void keyPressed(java.awt.event.KeyEvent key_event)
Called, when key in applet is pressed
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent key_event)
Called, when key in applet is released
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent key_event)
Called, when key in applet is typed
Specified by:
keyTyped in interface java.awt.event.KeyListener

ResetAllMovements

public void ResetAllMovements()
Reset all hero movements