de.hska.info1.backtracking
Class Labyrinth
java.lang.Object
de.hska.info1.backtracking.Labyrinth
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.awt.event.KeyListener, java.util.EventListener
public class Labyrinth
- extends java.lang.Object
- implements java.awt.event.ActionListener, java.awt.event.KeyListener
Wegsuche im Labyrinth mit Backtracking.
Diese Implementierung enthält noch viele Anweisungen
zum Zeichnen des Labyrinths und zur Behandlung
der Tastatureingaben.
Für eine übersichtlichere Lösunge bitte hier nachsehen
Labyrinth
- Author:
- pape
|
Constructor Summary |
Labyrinth(char[][] labyrinth,
int ausgangX,
int ausgangY)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Labyrinth
public Labyrinth(char[][] labyrinth,
int ausgangX,
int ausgangY)
sucheAusgang
public boolean sucheAusgang(int x,
int y)
setAriadne
public void setAriadne(Ariadne ariadne)
getHoehe
public int getHoehe()
getBreite
public int getBreite()
isWand
public boolean isWand(int x,
int y)
isFreierWeg
public boolean isFreierWeg(int x,
int y)
isBereitsBesucht
public boolean isBereitsBesucht(int x,
int y)
isGegangerWeg
public boolean isGegangerWeg(int x,
int y)
warte
public void warte()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
- Specified by:
keyPressed in interface java.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
- Specified by:
keyReleased in interface java.awt.event.KeyListener
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
- Specified by:
keyTyped in interface java.awt.event.KeyListener
Prof. Dr. Pape