org.eclipse.lifegame.domain
Class TwoDimensionalDeathRule

java.lang.Object
  |
  +--org.eclipse.lifegame.domain.Rule
        |
        +--org.eclipse.lifegame.domain.DeathRule
              |
              +--org.eclipse.lifegame.domain.TwoDimensionalDeathRule
All Implemented Interfaces:
TwoDimensionalRule

public class TwoDimensionalDeathRule
extends DeathRule
implements TwoDimensionalRule

Author:
Espirity Inc.

Constructor Summary
TwoDimensionalDeathRule()
           
 
Method Summary
 boolean doesApply(int[][] cells, int i, int j)
          Returns whether or not rule appies for passed cells, and current cell
 int getCellValue()
          Returns the value for rule
 
Methods inherited from class org.eclipse.lifegame.domain.Rule
getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoDimensionalDeathRule

public TwoDimensionalDeathRule()
Method Detail

getCellValue

public int getCellValue()
Returns the value for rule
Specified by:
getCellValue in interface TwoDimensionalRule

doesApply

public boolean doesApply(int[][] cells,
                         int i,
                         int j)
Returns whether or not rule appies for passed cells, and current cell
Specified by:
doesApply in interface TwoDimensionalRule