Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package WorldSimulator.Organisms;
- import WorldSimulator.World.World;
- import java.awt.*;
- public class Wolf extends Animal {
- public Wolf(int x, int y, World world)
- {
- this.name_ = "Wolf";
- this.symbol_ = "W";
- this.power_ = 9;
- this.courage_ = 5;
- this.positionX_ = x;
- this.positionY_ = y;
- this.backgroundColor = Color.DARK_GRAY; //wolf has white symbol on the dark gray background
- this.foregroundColor = Color.WHITE;
- world.isOccupied[positionX_][positionY_] = 1;
- }
- @Override
- public Organism createClone(World world)
- {
- return new Wolf(this.getX(), this.getY(), world);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement