org.eclipse.lifegame.domain
Class TwoDimensionalSurvivalRule

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

public class TwoDimensionalSurvivalRule
extends SurvivalRule
implements TwoDimensionalRule

Author:
Espirity Inc.

Constructor Summary
TwoDimensionalSurvivalRule()
           
 
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

TwoDimensionalSurvivalRule

public TwoDimensionalSurvivalRule()
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