Create a class LifeBug that is a kind of Bug. LifeBug has the following properties:

  1. A LifeBug only understands angles that are multiples of 90 degrees. A LifeBug will never be at any of the 45-degree angles.
  2. Adjacent squares are defined as vertical and horizontal but NOT diagonal.
  3. A LifeBug can move to any adjacent square that is open except for the one behind it. In other words, if the LifeBug is facing to the right, it cannot move left, but it could move up, right, or down.
  4. If a LifeBug cannot move because all of its neighbors are occupied, it simply sits for that iteration.
  5. After a LifeBug moves, it points in the direction of its movement. For example, if it moves up, it should point upward after movement.
  6. It does not matter if a LifeBug leaves or eats flowers. You can decide what to do about flowers.
  7. A LifeBug has a chance of breeding every time it acts. Call this probBreed. If it breeds, then the adjacent squares that are empty or contain a flower in all four directions are populated with LifeBug of its same color.
  8. If a LifeBug breeds, then it cannot move for that turn. Neither do its offspring.
  9. A LifeBug has a chance of dying every time it acts. The probability of that should be called probDeath. A LifeBug that dies simply ceases to be on the grid. You can decide whether or not to move the LifeBug before checking for dying.

Create a LifeBug class with probBreed = 1 in 7 and probDeath = 1 in 5.