Advertisement
egzosted

Wolf

May 24th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package WorldSimulator.Organisms;
  2.  
  3. import WorldSimulator.World.World;
  4. import java.awt.*;
  5. public class Wolf extends Animal {
  6. public Wolf(int x, int y, World world)
  7. {
  8. this.name_ = "Wolf";
  9. this.symbol_ = "W";
  10. this.power_ = 9;
  11. this.courage_ = 5;
  12. this.positionX_ = x;
  13. this.positionY_ = y;
  14. this.backgroundColor = Color.DARK_GRAY; //wolf has white symbol on the dark gray background
  15. this.foregroundColor = Color.WHITE;
  16. world.isOccupied[positionX_][positionY_] = 1;
  17. }
  18.  
  19. @Override
  20. public Organism createClone(World world)
  21. {
  22. return new Wolf(this.getX(), this.getY(), world);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement