org.bitstorm.gameoflife
Class ShapeCollection
java.lang.Object
org.bitstorm.gameoflife.ShapeCollection
- public class ShapeCollection
- extends java.lang.Object
Contains some nice Game Of Life shapes.
- Author:
- Edwin Martin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLEAR
private static final Shape CLEAR
GLIDER
private static final Shape GLIDER
SMALLEXPL
private static final Shape SMALLEXPL
EXPLODER
private static final Shape EXPLODER
CELL10
private static final Shape CELL10
FISH
private static final Shape FISH
PUMP
private static final Shape PUMP
SHOOTER
private static final Shape SHOOTER
COLLECTION
private static final Shape[] COLLECTION
ShapeCollection
public ShapeCollection()
getShapes
public static Shape[] getShapes()
- Get array of shapes.
It's not tamper-proof, but that's okay.
- Returns:
- collection of shapes
getShapeByName
public static Shape getShapeByName(java.lang.String name)
throws ShapeException
- Get shape by its name.
- Parameters:
name - name of shape
- Returns:
- shape object
- Throws:
ShapeException - if no shape with this name exist
This API descibes the Game of Life program, written by Edwin Martin. The source code is available online too.
Copyright 1996-2004 Edwin Martin <edwin@bitstorm.org>.