org.drools.examples.conway.patterns.Pulsar Maven / Gradle / Ivy
The newest version!
package org.drools.examples.conway.patterns;
/**
* The Pulsar
*
* @see ConwayPattern
* @see org.drools.examples.conway.CellGridImpl
* @author Jeff Brown
*/
public class Pulsar
implements
ConwayPattern {
private static final long serialVersionUID = 1L;
private final boolean[][] grid = {{false, true, false}, {true, true, true}, {true, false, true}, {true, true, true}, {false, true, false}};
/**
* This method should return a 2 dimensional array of boolean that represent
* a conway grid, with true
values in the positions where
* cells are alive
*
* @return array representing a conway grid
*/
public boolean[][] getPattern() {
return this.grid;
}
/**
* @return the name of this pattern
*/
public String getPatternName() {
return "Pulsar";
}
public String toString() {
return getPatternName();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy