org.eclipse.lifegame.domain
Class TwoDimensionalBirthRule

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

public class TwoDimensionalBirthRule
extends BirthRule
implements TwoDimensionalRule

Author:
Espirity Inc.

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

TwoDimensionalBirthRule

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