wodka.ga.geno.lang.turtle
Class TurtleLanguage

java.lang.Object
  extended bywodka.ga.geno.lang.AbstractLanguage
      extended bywodka.ga.geno.lang.turtle.TurtleLanguage
All Implemented Interfaces:
wwan.commons.param.Configurable, ContentComparable, GenotypeDesc, wwan.commons.param.Informative, Language, java.io.Serializable, StreamPersistable

public class TurtleLanguage
extends AbstractLanguage

See Also:
Serialized Form

Field Summary
 
Fields inherited from class wodka.ga.geno.lang.AbstractLanguage
globalRanges
 
Constructor Summary
TurtleLanguage()
           
TurtleLanguage(int gridWidth)
           
 
Method Summary
protected  Forward createForwardCommand()
           
protected  PenDown createPenDownCommand()
           
protected  PenUp createPenUpCommand()
           
 Genotype createRandomGenotype()
           
protected  Turn createTurnCommandWithRandomParams()
           
protected  int defaultGridWidth()
           
protected  int defaultProgramLength()
           
protected  void defineProgramLengthValues(wwan.commons.param.enum.EnumParamDesc desc)
           
protected  void fillTurtleProgram(Program pgm)
           
 void fromStream(java.io.DataInputStream inStream, int version)
           
 java.lang.String getInfo()
           
 java.lang.String getLabel()
           
 int getMaxForward()
           
 wwan.commons.param.ListParamDesc getParameterDescription()
           
 java.lang.String getShortName()
           
protected  int randomForwardValue()
           
protected  int randomTurnValue()
           
 void setFieldsFromParameterList(wwan.commons.param.ListParam listParam)
           
 void setMaxForward(int maxForward)
           
 void setParameterListFromFields(wwan.commons.param.ListParam listParam)
           
 void toStream(java.io.DataOutputStream outStream)
           
 
Methods inherited from class wodka.ga.geno.lang.AbstractLanguage
checkParameterList, getGlobalRanges, getGridWidth, getPgmLength, getProgramLength, getVersion, hasEqualContents, setGlobalRanges, setGridWidth, setPgmLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurtleLanguage

public TurtleLanguage()

TurtleLanguage

public TurtleLanguage(int gridWidth)
Method Detail

getMaxForward

public int getMaxForward()

setMaxForward

public void setMaxForward(int maxForward)

fillTurtleProgram

protected void fillTurtleProgram(Program pgm)

createPenDownCommand

protected PenDown createPenDownCommand()

createPenUpCommand

protected PenUp createPenUpCommand()

createTurnCommandWithRandomParams

protected Turn createTurnCommandWithRandomParams()

randomTurnValue

protected int randomTurnValue()

createForwardCommand

protected Forward createForwardCommand()

randomForwardValue

protected int randomForwardValue()

toStream

public void toStream(java.io.DataOutputStream outStream)
              throws java.io.IOException
Specified by:
toStream in interface StreamPersistable
Overrides:
toStream in class AbstractLanguage
Throws:
java.io.IOException

fromStream

public void fromStream(java.io.DataInputStream inStream,
                       int version)
                throws java.io.IOException
Specified by:
fromStream in interface StreamPersistable
Overrides:
fromStream in class AbstractLanguage
Throws:
java.io.IOException

getInfo

public java.lang.String getInfo()
Specified by:
getInfo in interface GenotypeDesc
Overrides:
getInfo in class AbstractLanguage

getLabel

public java.lang.String getLabel()

getShortName

public java.lang.String getShortName()

getParameterDescription

public wwan.commons.param.ListParamDesc getParameterDescription()
                                                         throws wwan.commons.param.ParamException
Specified by:
getParameterDescription in interface wwan.commons.param.Configurable
Overrides:
getParameterDescription in class AbstractLanguage
Throws:
wwan.commons.param.ParamException

setFieldsFromParameterList

public void setFieldsFromParameterList(wwan.commons.param.ListParam listParam)
                                throws wwan.commons.param.ParamException
Specified by:
setFieldsFromParameterList in interface wwan.commons.param.Configurable
Overrides:
setFieldsFromParameterList in class AbstractLanguage
Throws:
wwan.commons.param.ParamException

setParameterListFromFields

public void setParameterListFromFields(wwan.commons.param.ListParam listParam)
                                throws wwan.commons.param.ParamException
Specified by:
setParameterListFromFields in interface wwan.commons.param.Configurable
Overrides:
setParameterListFromFields in class AbstractLanguage
Throws:
wwan.commons.param.ParamException

createRandomGenotype

public Genotype createRandomGenotype()

defineProgramLengthValues

protected void defineProgramLengthValues(wwan.commons.param.enum.EnumParamDesc desc)
                                  throws wwan.commons.param.ParamException
Specified by:
defineProgramLengthValues in class AbstractLanguage
Throws:
wwan.commons.param.ParamException

defaultProgramLength

protected int defaultProgramLength()
Specified by:
defaultProgramLength in class AbstractLanguage

defaultGridWidth

protected int defaultGridWidth()
Specified by:
defaultGridWidth in class AbstractLanguage