ballwar.model.strategy
Class MultiSideWallStrategy

java.lang.Object
  extended by ballwar.model.strategy.ANoOpStrategy
      extended by ballwar.model.strategy.MultiSideWallStrategy
All Implemented Interfaces:
IUpdateStrategy

public class MultiSideWallStrategy
extends ANoOpStrategy

A wall consisting of multiple one-sided walls.


Field Summary
private  IAlgo initAlgo
          Algo to initialize all the walls
private  IAlgo paintAlgo
          Algo to paint all the walls.
private  IPaintStrategy paintStrategy
          Paint strategy that is forced into the host ball that is the composite of all the paintstrategies from the one-sided walls.
private  IAlgo updateAlgo
          Algo to update all the walls.
private  LRStruct wallSet
          The set of one-sided walls
 
Fields inherited from interface ballwar.model.IUpdateStrategy
NullObject
 
Constructor Summary
MultiSideWallStrategy()
          Creates a random rectangular box of walls either with walls facing outward or inward.
MultiSideWallStrategy(OneSideWallStrategy... walls)
           
 
Method Summary
 void init(Ball context)
          No-op
 void updateState(Ball context)
          No-op
 
Methods inherited from class ballwar.model.strategy.ANoOpStrategy
kill, updateCollision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wallSet

private LRStruct wallSet
The set of one-sided walls


updateAlgo

private IAlgo updateAlgo
Algo to update all the walls.


paintStrategy

private IPaintStrategy paintStrategy
Paint strategy that is forced into the host ball that is the composite of all the paintstrategies from the one-sided walls.


paintAlgo

private IAlgo paintAlgo
Algo to paint all the walls.


initAlgo

private IAlgo initAlgo
Algo to initialize all the walls

Constructor Detail

MultiSideWallStrategy

public MultiSideWallStrategy(OneSideWallStrategy... walls)

MultiSideWallStrategy

public MultiSideWallStrategy()
Creates a random rectangular box of walls either with walls facing outward or inward.

Method Detail

updateState

public void updateState(Ball context)
Description copied from class: ANoOpStrategy
No-op

Specified by:
updateState in interface IUpdateStrategy
Overrides:
updateState in class ANoOpStrategy
Parameters:
context - The ball to update.

init

public void init(Ball context)
Description copied from class: ANoOpStrategy
No-op

Specified by:
init in interface IUpdateStrategy
Overrides:
init in class ANoOpStrategy
Parameters:
context - The ball to initialize.