[SOLVED] 代写 game Java graph package pgdp.oop;

30 $

File Name: 代写_game_Java_graph_package_pgdp.oop;.zip
File Size: 376.8 KB

SKU: 8247505705 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


package pgdp.oop;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.io.File;

public abstract class Animal
protected int x, y;
static String filename;
protected File f;
protected Image image;
protected boolean alive;

protected static Animal antarktis;

public Animalint x, int y
this.xx;
this.yy;

public void move

TODO
if alive
if antarktisx14141y ! nullantarktisxy14141 ! null
antarktisx141y ! nullantarktisxy141 ! null
left
ifcanEatantarktisx14141y!antarktisx14141y141.canEatthis
!antarktisx24141y.canEatthis
!antarktisx14141y14141.canEatthis
antarktisx14141y.alivefalse;
xx14141;

up
else if canEatantarktisxy14141!antarktisxy24141.canEatthis
!antarktisx14141y14141.canEatthis
!antarktisx14141y141.canEatthis
antarktisxy1.alivefalse;
yy14141;

right
else if canEatantarktisx141y!antarktisx241y.canEatthis
!antarktisx141y141.canEatthis
!antarktisx141y14141.canEatthis
antarktisx141y.alivefalse;
xx141;

down
else if canEatantarktisxy141!antarktisxy241.canEatthis
!antarktisx14141y141.canEatthis
!antarktisx141y141.canEatthis
antarktisx141y.alivefalse;
yy141;

else if antarktisx14141ynullantarktisxy14141null
antarktisx141ynullantarktisxy141null
left
if antarktisx14141ynull
!antarktisx14141y141.canEatthis
!antarktisx24141y.canEatthis
!antarktisx14141y14141.canEatthis
xx1;

up
else if antarktisxy14141null!antarktisxy24141.canEatthis
!antarktisx14141y14141.canEatthis
!antarktisx14141y141.canEatthis
yy14141;

right
else if antarktisx141ynull!antarktisx241y.canEatthis
!antarktisx141y141.canEatthis
!antarktisx141y14141.canEatthis
xx141;

down
else if antarktisxy141null!antarktisxy241.canEatthis
!antarktisx14141y141.canEatthis
!antarktisx141y141.canEatthis
yy141;

else
xx;
yy;

public abstract boolean canEatAnimal animal;

protected abstract boolean eatenByPenguin penguin;
protected abstract boolean eatenByPlayerPenguin playerPenguin;
protected abstract boolean eatenByWhale whale;
protected abstract boolean eatenByLeopardSeal leopardSeal;
protected abstract boolean eatenByFish fish;

public static void setAntarktisAnimal antarktis
Animal.antarktisantarktis;

Graphics StuffYou dont have to do anything here

private void paintSymbolGraphics g, Color c, int height, int width
GradientPaint gradientnew GradientPaint15, 0, c, width, 0, Color.LIGHTGRAY;
Graphics2D g.setPaintgradient;
Graphics2D g.setRenderingHintRenderingHints.KEYANTIALIASING, RenderingHints.VALUEANTIALIASON;
g.fillOvalint width0.3, int height0.3, int width0.5,
int height0.5;

public void drawGraphics g, int height, int width
if imagenull
paintSymbolg, Color.YELLOW, height, width;
return;

Graphics2D g.drawImageimage, 0, 0, width, height, 0, 0, image.getWidthnull,
image.getHeightnull, null;

package pgdp.oop;

import java.awt.event.WindowEvent;

public class Antarktis extends Maze
private static int width, height;
private static Penguin lostPenguin;
private static Whale whalesnew Whale5;
private static LeopardSeal leopardSealsnew LeopardSeal20;
private static Fish fishesnew Fish500;
private static PlayerPenguin playerPenguin;

public static void mainString args
width41;
height41;
antarktisgenerateMazewidth, height;
setupMaze;
draw;
gameLoop;
Close the opnend frame
closeFrame;

private static void gameLoop
boolean endfalse;
while !end
TODO maybe
draw;
TODO maybe
if currentEventUP
endplayerPenguin.moveplayerPenguin.x, playerPenguin.y1;

else if currentEventDOWN
endplayerPenguin.moveplayerPenguin.x, playerPenguin.y1;

else if currentEventLEFT
endplayerPenguin.moveplayerPenguin.x1, playerPenguin.y;

else if currentEventRIGHT
endplayerPenguin.moveplayerPenguin.x1, playerPenguin.y;

if end return;
else moveAll;
currentEventNOTHING;

TODO maybe

private static void moveAll
TODO
playerPenguin.move
for int i0; iwhales.length; i
whalesi.move;

for int i0; ileopardSeals.length; i
leopardSealsi.move;

lostPenguin.move;
for int i0; ifishes.length; i
fishesi.move;

Example Setup for easier Testing during development

private static void setupMaze
int pos;
playerPenguinnew PlayerPenguin3, 3;
antarktis33playerPenguin;

for int i0; iwhales.length; i
posgetRandomEmptyField;
whalesinew Whalepos0, pos1;
antarktispos0pos1whalesi;

for int i0; ileopardSeals.length; i
posgetRandomEmptyField;
leopardSealsinew LeopardSealpos0, pos1;
antarktispos0pos1leopardSealsi;

for int i0; ifishes.length; i
posgetRandomEmptyField;
fishesinew Fishpos0, pos1;
antarktispos0pos1fishesi;

antarktis2020new Penguin20, 20;
lostPenguinPenguin antarktis2020;

package pgdp.oop;

import java.awt.Toolkit;
import java.io.File;

public class Fish extends Animal
static String filenamefish.png;

public Fishint x, int y
superx, y;

fnew Filefilename;
imageToolkit.getDefaultToolkit.getImagef.getAbsolutePath;

public void move
TODO
if alive
if antarktisx14141ynullantarktisxy14141null
antarktisx141ynullantarktisxy141null
up
if antarktisxy14141null!antarktisxy24141.canEatthis
!antarktisx14141y14141.canEatthis
!antarktisx14141y141.canEatthis
yy14141;

right
else if antarktisx141ynull!antarktisx2y.canEatthis
!antarktisx141y141.canEatthis
!antarktisx141y14141.canEatthis
xx141;

down
else if antarktisxy141null!antarktisxy241.canEatthis
!antarktisx14141y141.canEatthis
!antarktisx141y141.canEatthis
yy141;

left
else if antarktisx14141ynull
!antarktisx14141y141.canEatthis
!antarktisx24141y.canEatthis
!antarktisx14141y14141.canEatthis
xx14141;

else
xx;
yy;

public boolean canEatAnimal animal
return animal.eatenBythis;

protected boolean eatenByPenguin penguin
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByPlayerPenguin playerPenguin
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByWhale whale
return false;

protected boolean eatenByLeopardSeal leopardSeal
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByFish fish
return false;

package pgdp.oop;

import java.awt.Toolkit;
import java.io.File;

public class LeopardSeal extends Animal
static String filenameleopard.png;

public LeopardSealint x, int y
superx, y;

fnew Filefilename;
imageToolkit.getDefaultToolkit.getImagef.getAbsolutePath;

public boolean canEatAnimal animal
return animal.eatenBythis;

protected boolean eatenByPenguin penguin
return false;

protected boolean eatenByPlayerPenguin playerPenguin
return false;

protected boolean eatenByWhale whale
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByLeopardSeal leopardSeal
return false;

protected boolean eatenByFish fish
return false;

package pgdp.oop;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Point;
import java.awt.RenderingHints;
import java.awt.event.;
import java.util.Random;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class Maze extends MiniJava
public static boolean drawtrue;

protected static final int NOTHING1;
protected static final int LEFT1;
protected static final int UP2;
protected static final int RIGHT3;
protected static final int DOWN4;

private static JFrame framenull;
static Animal antarktis;
private static int wannaSleep100;
private static boolean pausefalse;
private static Random rnew Random;
protected static int currentEventNOTHING;

SuppressWarningsserial
private static class Field extends JPanel
Point p;
int x, y;

public Fieldint x, int y
this.xx;
this.yy;
pgetLocation;

public void paintGraphics g
super.paintg;
GradientPaint gradientnew GradientPaint0, 50, Color.WHITE, getWidth, 0, Color.GRAY;
Graphics2D g.setPaintgradient;

g.fillRectp.getLocation.x, p.getLocation.y, getWidth2, getHeight;

if antarktisxy ! null
antarktisxy.drawg, getWidth, getHeight;

private void paintSymbolGraphics g, Color c
GradientPaint gradientnew GradientPaint15, 0, c, getWidth, 0, Color.LIGHTGRAY;
Graphics2D g.setPaintgradient;
Graphics2D g.setRenderingHintRenderingHints.KEYANTIALIASING, RenderingHints.VALUEANTIALIASON;
g.fillOvalint getWidth0.3, int getHeight0.3, int getWidth0.5,
int getHeight0.5;

private static void setupint height, int width

JPanel contentnew JPanelnew GridLayoutwidth, height;

for int y0; yantarktis0.length; y
for int x0; xantarktis.length; x
content.addnew Fieldx, y;

framenew JFrameAMazeIng;
frame.getContentPane.addcontent;
frame.setSize400, 400antarktis0.lengthantarktis.length;
frame.setDefaultCloseOperationJFrame.EXITONCLOSE;

frame.addComponentListenernew ComponentAdapter
Override
public void componentResizedComponentEvent e
frame.repaint;

;

frame.addKeyListenernew KeyAdapter
Override
public void keyPressedKeyEvent ke
switch ke.getKeyCode
case KeyEvent.VKLEFT:
currentEventLEFT;
break;
case KeyEvent.VKRIGHT:
currentEventRIGHT;
break;
case KeyEvent.VKUP:
currentEventUP;
break;
case KeyEvent.VKDOWN:
currentEventDOWN;
break;
default:
break;

;

frame.setVisibletrue;

public static void draw
if !drawantarktis.length0
return;
if framenull
setup41, 41;

try
while pause
Thread.sleep50;
update;
Thread.sleepwannaSleep;
catch InterruptedException ie
Intentionally left blank

private static void update
frame.repaint;

public static Animal generateMazeint width, int height
Animal mazenew Animalwidthheight;

for int i0; imaze.length; i
for int j0; jmazei.length; j
mazeijnull;

return maze;

public static int getRandomEmptyField
int x, y;
do
xr.nextInt41;
yr.nextInt41;
while antarktisxy ! null;
return new intx, y;

public static void closeFrame
frame.dispatchEventnew WindowEventframe, WindowEvent.WINDOWCLOSING;

package pgdp.oop;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.Random;

This class provides convenience methods to make the barrier of entry into
programming easier. In addition to that it realizes an educational
sublanguage to Java called Mini Java with simpler grammar.
p
iDiese Klasse stellt simple Methoden zur Verfgung um den Einstieg in die
Programmierung zu vereinfachen. Zustzlich dazu wird damit eine fr die Lehre
zusammengestellte SubProgrammiersprache von Java umgesetzt, die sich Mini
Java nennt und eine einfachere Grammatik besitzti

public class MiniJava
private static Random rand;
private static InputStream isSystem.in;
private static BufferedReader bufferedReadernew BufferedReadernew InputStreamReaderis;

Reads a link String from the console, and prompts the user by printing the
given codetextcode with a line break to the console.
p

iLiest einen link String von der Konsole ein, und fordert den oder die
Benutzerin durch die Ausgabe des bergebenen codetextcodees zur Eingabe
auf mit Zeilenumbruch.i

param text the text to display on the console before reading an input.
return the input string or codenullcode, if no input is available
should normally not happen

public static String readStringString text
Exchange the reader in case System.in has changed.
This is necessary for testing, as for every test input, System.in is changed.
TODO: Consider whether a better solution is possible with mockinga different
InputStream implementation
on the test side.
if System.in ! is
isSystem.in;
bufferedReadernew BufferedReadernew InputStreamReaderis;

try
System.out.printlntext;
return bufferedReader.readLine;
catch IOException e
We hide the exception in the method signature by rethrowing an unchecked
exception
throw new UncheckedIOExceptionKonnte Eingabe nicht lesen., e;

Reads a link String from the console, and prompts the user by printing the
line

pre
Eingabe:
pre

iLiest einen link String von der Konsole ein, und fordert den oder die
Benutzerin dazu auf durch die Ausgabe von

pre
Eingabe:
pre

i

public static String readString
return readStringEingabe:;

Tries to read an codeintcode from the console, and retires if the input
was not a valid integer. It prompts the user by printing the given
codetextcode with a line break to the console.
p
iVersucht einen codeintcodeWert von der Konsole einzulesen, und
wiederholt die Anfrage solange es nicht nicht um eine ganze Zahl handelt. Der
oder die Benutzerin wird durch die Ausgabe des bergebenen
codetextcodees zur Eingabe aufgefordert mit Zeilenumbruch.i

see IntegerparseIntString

public static int readIntString text
Integer xnull;
do
String sreadStringtext;
if snull
throw new IllegalStateExceptionEs ist keine Eingabe mehr verfgbar.;
try
xInteger.parseInts.trim;
catch SuppressWarningsunused NumberFormatException e
try again

while xnull;
return x;

Works like link readIntString, but uses the following preset text to
prompt the user:

pre
Geben Sie eine ganze Zahl ein:
pre

iFunktioniert wie link readIntString, nutzt jedoch folgenden
vorgegebenen Text:

pre
Geben Sie eine ganze Zahl ein:
pre

i

public static int readInt
return readIntGeben Sie eine ganze Zahl ein:;

Identical to link readIntString.
p
iIdentisch zu link readIntStringi

public static int readString text
return readInttext;

Identical to link readInt.
p
iIdentisch zu link readInti

public static int read
return readInt;

Tries to read an codedoublecode from the console, and retires if the
input was not a valid double value. It prompts the user by printing the given
codetextcode with a line break to the console.
p
iVersucht einen codedoublecodeWert von der Konsole einzulesen, und
wiederholt die Anfrage solange es nicht nicht um eine gltige
codedoublecodeFliekommazahl handelt. Der oder die Benutzerin wird
durch die Ausgabe des bergebenen codetextcodees zur Eingabe
aufgefordert mit Zeilenumbruch.i

see DoubleparseDoubleString

public static double readDoubleString text
Double xnull;
do
String sreadStringtext;
if snull
throw new IllegalStateExceptionEs ist keine Eingabe mehr verfgbar.;
try
xDouble.parseDoubles.trim;
catch SuppressWarningsunused NumberFormatException e
try again

while xnull;
return x;

Works like link readDoubleString, but uses the following preset text to
prompt the user:

pre
Geben Sie eine Zahl ein:
pre

iFunktioniert wie link readDoubleString, nutzt jedoch folgenden
vorgegebenen Text:

pre
Geben Sie eine Zahl ein:
pre

i

public static double readDouble
return readDoubleGeben Sie eine Zahl ein:;

Prints the link String to the console and breaks the line.
p
iGibt den link String auf der Konsole aus und beginnt eine neue
Zeile.i

public static void writeString output
System.out.printlnoutput;

Prints the codeintcode to the console and breaks the line.
p
iGibt den codeintcodeWert auf der Konsole aus und beginnt eine neue
Zeile.i

public static void writeint output
writeoutput;

Prints the codedoublecode to the console and breaks the line.
p
iGibt den codedoublecodeWert auf der Konsole aus und beginnt eine
neue Zeile.i

public static void writedouble output
writeoutput;

Identical to link writeString.
p
iIdentisch zu link writeStringi

public static void writeLineConsoleString output
System.out.printlnoutput;

Identical to link writeint.
p
iIdentisch zu link writeinti

public static void writeLineConsoleint output
writeLineConsoleoutput;

Identical to link writedouble.
p
iIdentisch zu link writedoublei

public static void writeLineConsoledouble output
writeLineConsoleoutput;

Prints a line separator in the console.
p
iGibt einen Zeilenumbruch auf der Konsole aus.i

public static void writeLineConsole
writeLineConsole;

Prints the link String to the console. Does not end with a line break.
p
iGibt den link String auf der Konsole aus. Endet nicht mit einem
Zeilenumbruch.i

public static void writeConsoleString output
System.out.printoutput;

Prints the codeintcode to the console. Does not end with a line break.
p
iGibt den codeintcodeWert auf der Konsole aus. Endet nicht mit einem
Zeilenumbruch.i

public static void writeConsoleint output
writeConsoleoutput;

Prints the codedoublecode to the console. Does not end with a line
break.
p
iGibt den codedoublecodeWert auf der Konsole aus. Endet nicht mit
einem Zeilenumbruch.i

public static void writeConsoledouble output
writeConsoleoutput;

public static void resetRandom
randnull;

public static void setRandomWithSeedint seed throws IllegalAccessException
if rand ! null
throw new IllegalAccessExceptionDont touch this;

randnew Randomseed;

public static void setRandom throws IllegalAccessException
setRandomWithSeed144;

public static int randomIntint minval, int maxval
return minvalrand.nextIntmaxvalminval1;

Draws a random card, represented by its value. The value ranges from 2
inclusive to 11 inclusive.
p
iZieht eine zufllige Karte, reprsentiert durch ihren Wert. Der Wert liegt
im Bereich 2 inklusive bis 11 inklusive.i

public static int drawCard
return randomInt2, 11;

Returns a random integer between 1 inclusive to 6 inclusive.
p
iGibt eine zufllige Zahl zwischen 1 inklusive bis 6 inklusive
zurck.i

public static int dice throws IllegalAccessException
if randnull
setRandom;

return randomInt1, 6;

package pgdp.oop;

import java.awt.Toolkit;
import java.io.File;

public class Penguin extends Animal
static String filenametux.png;

public Penguinint x, int y
superx, y;

fnew Filefilename;
imageToolkit.getDefaultToolkit.getImagef.getAbsolutePath;

public boolean canEatAnimal animal
return animal.eatenBythis;

protected boolean eatenByPenguin penguin
return false;

protected boolean eatenByPlayerPenguin playerPenguin
return false;

protected boolean eatenByWhale whale
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByLeopardSeal leopardSeal
this.alivefalse;
antarktisxynull;
return true;

protected boolean eatenByFish fish
return false;

package pgdp.oop;

public class PlayerPenguin extends Penguin
public PlayerPenguinint x, int y
superx, y;

public boolean canEatAnimal animal
return animal.eatenBythis;

TODO
public boolean moveint newX, int newY
game continues
if antarktisnewXnewYnullthis.canEatantarktisnewXnewY
this.xnewX;
this.ynewY;
return false;

win
else if antarktisnewXnewY.getClass.isAssignableFromPenguin.class
this.xnewX;
this.ynewY;
return true;

lose
else
this.xnewX;
this.ynewY;
return true;

package pgdp.oop;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import static pgdp.oop.Antarktis.antarktis;

public class TestMovePlayer
private static final TestPlayer testsnew TestPlayer

System.out.printlnFeld:;
System.out.printlnpp;
System.out.printlnpp.move0, 1;;

var playeraddnew PlayerPenguin0, 0;

var returnValplayer.move0, 1;

assert antarktis01player : Spieler steht nicht auf 01, sondern auf realPosplayer.;
assert player.x0player.y1
: x und yAttribut des Pinguins sind falsch. 01 erwartet, ist jedoch posplayer.;
assert antarktis00null : 00 ist nicht leer.;
assert !returnVal : Rckgabewert ist nicht false.;
,

System.out.printlnFeld:;
System.out.printlnpp;
System.out.printlnpp.move31, 4;;

var playeraddnew PlayerPenguin0, 0;

var returnValplayer.move31, 4;

assert antarktis314player : Spieler steht nicht auf 314, sondern auf realPosplayer
. Teleportation soll mglich sein.;
assert player.x31player.y4
: x und yAttribut des Pinguins sind falsch. 314 erwartet, ist jedoch posplayer
. Teleportation soll mglich sein.;
assert antarktis00null : 00 ist nicht leer.;
assert !returnVal : Rckgabewert ist nicht false.;
,

System.out.printlnFeld:;
System.out.printlnppp;
System.out.printlnpp.move2, 0;;

var playeraddnew PlayerPenguin0, 0;
addnew Penguin2, 0;

var returnValplayer.move2, 0;

assert returnVal : Rckgabewert ist nicht true.;
,

System.out.printlnFeld:;
System.out.printlnpps w;
System.out.printlnpp.move2, 0;;

var playeraddnew PlayerPenguin0, 0;
addnew LeopardSeal2, 0;
addnew Whale3, 0;

var returnValplayer.move2, 0;

assert returnVal : Rckgabewert ist nicht true.;
,

System.out.printlnFeld:;
System.out.printlnppw;
System.out.printlnpp.move2, 0;;

var playeraddnew PlayerPenguin0, 0;
addnew Whale2, 0;

var returnValplayer.move2, 0;

assert returnVal : Rckgabewert ist nicht true.;
,

System.out.printlnFeld:;
System.out.printlnppf w;
System.out.printlnpp.move2, 0;;

var playeraddnew PlayerPenguin0, 0;
var fishaddnew Fish2, 0;
addnew Whale3, 0;

var returnValplayer.move2, 0;

assert antarktis20player : Spieler steht nicht auf 20, sondern auf realPosplayer.;
assert player.x2player.y0
: x und yAttribut des Pinguins sind falsch. 20 erwartet, ist jedoch posplayer.;
assert antarktis00null : 00 ist nicht leer.;
assert !fish.alive : Der Fisch ist nicht tot.;
assert !returnVal : Rckgabewert ist nicht false.;
,

System.out.printlnFeld:;
System.out.printlnpp;
System.out.printlnpp.move314, 159;;

var playeraddnew PlayerPenguin0, 0;

try
player.move314, 159;
catch Exception e
e.printStackTrace;
assert false : Obige Exception trat beim Testen mit einer Position auerhalb des Spielfeldes auf.;

;

private static Animal addAnimal animal
antarktisanimal.xanimal.yanimal;
return animal;

private static PlayerPenguin addPlayerPenguin player
antarktisplayer.xplayer.yplayer;
return player;

private static String posAnimal animal
return animal.xanimal.y;

private static String realPosAnimal animal
for int x0; xantarktis.length; x
for int y0; yantarktis.length; y
if antarktisxyanimal return xy;

return gar keinem Feld;

private static void timeout
new TimeoutExceptionDas dauert zu lange! Test abgebrochen. 2 Sekunden reichen fr den Test aus..printStackTrace;
System.exit1;

public static void mainString args
boolean eafalse;
assert eatrue;
if !ea throw new UnsupportedOperationExceptionDu hast Assertions nicht aktiviert,
obwohl diese fr diesen Test erforderlich sind. Fge zu deinen JVMOptionen die Option ea hinzu.
Wie das geht, ist in der pgdptestsDiscussion beschrieben.;

System.out.printlnDiese Tests testen public boolean moveint newX, int newY anhand mehrerer Beispiele.;
System.out.printlnSchlgt ein Test fehl, bricht das Programm sofort ab
und alle weiteren Tests werden nicht ausgefhrt.;
System.out.printlnKeine Garantie auf Vollstndigkeit und Richtigkeit!;
System.out.printlnErstellt von Max Schrder :;
System.out.printlnDer Test startet nun und wird maximal 2 Sekunden laufen.;
System.out.println;

ScheduledExecutorService executorExecutors.newSingleThreadScheduledExecutor;
executor.scheduleTestMovePlayer::timeout, 2, TimeUnit.SECONDS;

try
for int i0; itests.length; i
System.out.println Test i1 ;
antarktisAntarktis.generateMaze41, 41;
Animal.setAntarktisantarktis;
testsi.test;
System.out.printlnOK;
System.out.println;

finally
executor.shutdownNow;

System.out.printlnn
n
n
n
n
n
n
n
n
n
n
n
;n
; ;n
;n
;n
n
;
System.out.println;
System.out.println Glckwunsch: Alle Tests bestanden! ;
System.out.println ACHTUNG: Diese Tests garantieren nicht, dass Dein Code fehlerfrei ist! ;

interface TestPlayer
void test;
package pgdp.oop;

import java.awt.Toolkit;
import java.io.File;

public class Whale extends Animal
static String filenamewhale.png;

public Whaleint x, int y
superx, y;

fnew Filefilename;
imageToolkit.getDefaultToolkit.getImagef.getAbsolutePath;

public boolean canEatAnimal animal
return animal.eatenBythis;

protected boolean eatenByPenguin penguin
return false;

protected boolean eatenByPlayerPenguin playerPenguin
return false;

protected boolean eatenByWhale whale
return false;

protected boolean eatenByLeopardSeal leopardSeal
return false;

protected boolean eatenByFish fish
return false;

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 game Java graph package pgdp.oop;
30 $