public abstract class Denker
extends java.lang.Object
import melog.skript.*; public class XY extends Denker { public XY(Ich ich, int[] erinnerung, Land land, Nachricht[] nachrichten, Freund[] freunde, Feind[] feinde, Rohstoff[] rohstoffe, Turm[] turm, Wirkung[] wirkungen) { super(ich, erinnerung, land, nachrichten, freunde, feinde, rohstoffe, turm, wirkungen); } public void denke() { //zu füllen } public void warnung() { //zu füllen } }
Modifier and Type | Field and Description |
---|---|
int[] |
erinnerung
Sein Gedächtnis.
|
Feind[] |
feinde
Die verfeindeten Golems in Sichtweite.
|
static int |
FERNKAMPF
Code für Fernkämpfer.
|
static int |
FLIEGER
Code für Flieger.
|
Freund[] |
freunde
Die verbündeten Golems in Sichtweite.
|
static int |
HOLZ
Code für das Element Holz.
|
Ich |
ich
Der Golem, welcher gerade denkt.
|
static int |
KNECHT
Code für den Knecht.
|
static int |
KUNDSCHAFTER
Code für den Kundschafter.
|
Land |
land
Sein Kartenwissen.
|
Turm |
meister
Der verbündete Magierturm, null falls nicht in Sichtweite.
|
Nachricht[] |
nachrichten
Die empfangenen Nachrichten seit dem letzten Denkzyklus.
|
static int |
NAHKAMPF
Code für Nahkämpfer.
|
static int |
PIONIER
Code für den Pionier.
|
Turm |
rivale
Der verfeindete Magierturm, null falls nicht in Sichtweite.
|
Rohstoff[] |
rohstoffe
Die Rohstoffhaufen in Sichtweite.
|
static int |
WAECHTER
Code für den Wächter.
|
Wirkung[] |
wirkungen
Die wirkenden Effekte in Sichtweite.
|
Constructor and Description |
---|
Denker(Ich ich,
int[] erinnerung,
Land land,
Nachricht[] nachrichten,
Freund[] freunde,
Feind[] feinde,
Rohstoff[] rohstoffe,
Turm[] turm,
Wirkung[] wirkungen)
Konstruktor, wird vom Spiel verwendet.
|
Modifier and Type | Method and Description |
---|---|
static double |
abstand(double x,
double y)
Berechnet den Abstand zum Turm.
|
static double |
abstand(double x1,
double y1,
double x2,
double y2)
Berechnet den Abstand zwischen den zwei Punktepaaren.
|
static boolean |
baum(byte code)
Gibt an, ob ein Feld-Code ein Baumfeld darstellt.
|
static int |
bewuchs(byte code)
Gibt den Inhalt eines Inselfeldes an.
|
void |
debug(java.lang.String msg)
Veranlasst das Spiel, eine Debugnachricht auf der Konsole auszugeben, wenn dieser Golem ausgewählt ist.
|
abstract void |
denke()
Von hier aus müssen alle Entscheidungen des Golems an die Schnittstellenobjekte weitergegeben werden.
|
static int |
element(int typ)
Gibt das Element des entsprechenden Typs an (= typ / 10).
|
static boolean |
fluss(byte code)
Gibt an, ob ein Feld-Code ein Flussfeld darstellt.
|
Freund |
freund(int id)
Sucht aus den Freunden in Sichtweite einen bestimmten aus.
|
Freund |
freund(Nachricht nachr)
Sucht aus den Freunden in Sichtweite einen bestimmten aus.
|
static boolean |
gras(byte code)
Gibt an, ob ein Feld-Code ein Grasfeld darstellt.
|
static boolean |
grube(byte code)
Gibt an, ob ein Feld-Code ein Grubenfeld darstellt.
|
static boolean |
mauer(byte code)
Gibt an, ob ein Feld-Code ein Mauerfeld darstellt.
|
static boolean |
meer(byte code)
Gibt an, ob ein Feld-Code ein Meeresfeld darstellt.
|
static boolean |
nebel(byte code)
Gibt an, ob ein Feld-Code ein Nebelfeld darstellt.
|
static int |
niveau(byte code)
Gibt das Höhenniveau eines Inselfeldes an.
|
double |
param(java.lang.String name)
Gibt einen Spielparameter anhand des Namens zurück.
|
static boolean |
quelle(byte code)
Gibt an, ob ein Feld-Code ein Quellenfeld darstellt.
|
static int |
sorte(int typ)
Gibt die Sorte des entsprechenden Typs an (= typ % 10).
|
abstract void |
warnung()
Wird nach Überschreitung des Denklimits aufgerufen.
|
static boolean |
wirbel(byte code)
Gibt an, ob ein Feld-Code ein Wirbelfeld darstellt.
|
static double |
xyDouble(int xy)
Gibt den Kästchenmittelpunkt zum Kästchenindex an.
|
static int |
xyInt(double xy)
Gibt den Kästchenindex zu der exakten Koordinate an.
|
static double |
xyMid(double xy)
Gibt den Kästchenmittelpunkt zu exakten Koordinaten an.
|
public int[] erinnerung
public Feind[] feinde
public static final int FERNKAMPF
public static final int FLIEGER
public Freund[] freunde
public static final int HOLZ
public Ich ich
public static final int KNECHT
public static final int KUNDSCHAFTER
public Land land
public Turm meister
public Nachricht[] nachrichten
public static final int NAHKAMPF
public static final int PIONIER
public Turm rivale
public Rohstoff[] rohstoffe
public static final int WAECHTER
public Wirkung[] wirkungen
public Denker(Ich ich, int[] erinnerung, Land land, Nachricht[] nachrichten, Freund[] freunde, Feind[] feinde, Rohstoff[] rohstoffe, Turm[] turm, Wirkung[] wirkungen)
public static double abstand(double x, double y)
public static double abstand(double x1, double y1, double x2, double y2)
public static boolean baum(byte code)
public static int bewuchs(byte code)
public void debug(java.lang.String msg)
public abstract void denke()
public static int element(int typ)
public static boolean fluss(byte code)
public Freund freund(int id)
id
- Die ID des zu suchenden Freundes.public Freund freund(Nachricht nachr)
nachr
- Die Nachricht des zu suchenden Freundes.public static boolean gras(byte code)
public static boolean grube(byte code)
public static boolean mauer(byte code)
public static boolean meer(byte code)
public static boolean nebel(byte code)
public static int niveau(byte code)
public double param(java.lang.String name)
public static boolean quelle(byte code)
public static int sorte(int typ)
public abstract void warnung()
public static boolean wirbel(byte code)
public static double xyDouble(int xy)
public static int xyInt(double xy)
public static double xyMid(double xy)