//generated Class ThemedWordletFactory
// Do not edit outside marked user editing areas (UEA)
//------------------------------------------>UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq2(ZK[(dgo
//RCS-generated log goes here. Do not edit this UEA
//$Log: ThemedWordletFactory.js,v $
//Revision 1.1 2003-04-16 14:59:13+02 bh
//<>
//
//Revision 1.0 2001-06-06 09:47:35+02 bh
//Initial revision
//
//<------------------------------------------UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq2(ZK[(dgo
/*
* .<!>
*<P>
*@author $Author: bh $.<!>
*@version $Revision: 1.1 $
*/
//static attributes
//designed operations
function ThemedWordletFactory_getAnyForTheme ( thatTheme) {
//------------------------------------------>UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq(om|IfqNgz\`mem( lm&mpxmz|mie&j}dd{`a|&\`mei!
var themeWordlets = new Array();
for(var idx = 0; idx < this.theThemedWordlets.length; idx++) {
if(this.theThemedWordlets[idx].getTheme() == thatTheme) themeWordlets[themeWordlets.length] = this.theThemedWordlets[idx];
}
var theRange = themeWordlets.length - 1;
var picked = Math.round(Math.random() * theRange);
return themeWordlets[picked];
//<------------------------------------------UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq(om|IfqNgz\`mem( lm&mpxmz|mie&j}dd{`a|&\`mei!
}
function ThemedWordletFactory_add ( thatWordlet) {
//------------------------------------------>UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq(ill( lm&mpxmz|mie&j}dd{`a|&_gzldm|!
var oldLength = this.theThemedWordlets.length;
this.theThemedWordlets[oldLength] = thatWordlet;
//<------------------------------------------UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzq(ill( lm&mpxmz|mie&j}dd{`a|&_gzldm|!
}
//constructor
function ThemedWordletFactory( thatName) {
//methods
this.getAnyForTheme = ThemedWordletFactory_getAnyForTheme;
this.add = ThemedWordletFactory_add;
//associations
this.theThemedWordlets = new Array();
//attributes
//------------------------------------------>UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzqWKgf{|z}k|gz
this.name = thatName;
//<------------------------------------------UEAlm&mpxmz|mie&j}dd{`a|&\`meml_gzldm|Nik|gzqWKgf{|z}k|gz
}
//superclass
ThemedWordletFactory.prototype = new WordletFactory;