|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrules.AbRuleBean
public abstract class AbRuleBean
Created on November 2, 2006, 9:49 PM
Abstract rule bean, used to check the rules of othello.
Added parameter to specify the color of the piece placed so it does not have to already be placed before validation.
| Constructor Summary | |
|---|---|
AbRuleBean()
Creates a new instance of AbRuleBean |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds the property change listener. |
abstract void |
flipPieces(OthelloCell[][] cells,
java.awt.Point cp,
java.lang.String placed)
Loops through all the starting from the cell specified and flips the pieces if valid. |
java.beans.PropertyChangeSupport |
getPropertySupport()
Gets the property change support. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the property change listener. |
abstract boolean |
validate(OthelloCell[][] cells,
java.awt.Point cp,
java.lang.String placed)
Validates the point, based on the current game board and the color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbRuleBean()
| Method Detail |
|---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The new listener.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to remove.public java.beans.PropertyChangeSupport getPropertySupport()
public abstract boolean validate(OthelloCell[][] cells,
java.awt.Point cp,
java.lang.String placed)
cells - The game baord to validate.cp - The point to be validated.placed - The color placed on the board.
public abstract void flipPieces(OthelloCell[][] cells,
java.awt.Point cp,
java.lang.String placed)
cells - The game board to modify.cp - The origin of the flipping.placed - The color placed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||