Class CreatureModel


  • public class CreatureModel
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int round
      round last round updated
      int x
      x last x of creature
      int y
      y last y of creature
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getProbability​(int px, int py, int r)  
      void update​(int x2, int y2, int r)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public int x
        x last x of creature
      • y

        public int y
        y last y of creature
      • round

        public int round
        round last round updated
    • Constructor Detail

      • CreatureModel

        public CreatureModel​(ISpaceObject creature,
                             int w,
                             int h)
        Parameters:
        creature -
        w -
        h -
    • Method Detail

      • getProbability

        public double getProbability​(int px,
                                     int py,
                                     int r)
        Parameters:
        px -
        py -
        r - > round
        Returns:
        the probability the creature is in px,py in round r
      • update

        public void update​(int x2,
                           int y2,
                           int r)
        Parameters:
        x2 -
        y2 -
        r -