Trolls are only counterfeits, made by the Enemy in the Great Darkness, in mockery of Ents, as Orcs were of Elves.
J. R. R. Tolkien, The Two Towers (1954), Book III, Chapter 4: "Treebeard"
* TODO View settings
+- [ ] troll pants colors
* TODO Troll quotes
- pain au chocolat ou chocolatine
-
+* TODO initial model parametrization
+* TODO view parameterization?
+* TODO troll races
STILL("stands still.", 1),
RIGHT("walks right.", 2);
- String movement;
- int index;
+ String movement; int index;
Dir(String mvt, int i) { movement = mvt; index = i; }
}
.setStrokeColor(0xFFFF00)
.setFillColor(0xFFFF00)
.setFontSize(40);
+ toggleModule.displayOnToggleState(trollMessage, "verboseTrolling", true);
}
private void moveTroll() {
, ToggleModule
];
+function trollCase(string) {
+ return string.split('')
+ .map(c => c < 64 ? c : String.fromCharCode(c.charCodeAt(0) ^ (32 * (Math.floor(2*Math.random())))))
+ .join('');
+}
+
+function trollToggle(toggle, title, def) {
+ var obj = {};
+ obj['toggle'] = toggle;
+ obj['title'] = trollCase(title);
+ obj['values'] = {};
+ for (var i = 3; i < arguments.length; i += 2) {
+ obj['values'][trollCase(arguments[i])] = arguments[i+1];
+ }
+ obj['default'] = def;
+ if (def == undefined) {
+ if (values.length > 2) {
+ obj['default'] = values.length * Math.floor(2 * Math.random());
+ }
+ else {
+ obj['default'] = Math.random() < 0.5;
+ }
+ }
+ return ToggleModule.defineToggle(obj);
+}
+
export const options = [
- ToggleModule.defineToggle({
- toggle: 'debug',
- title: 'Debug Mode',
- values: {
- 'on': true,
- 'off': false
- },
- default: false
- })
+ trollToggle('verboseTrolling', 'Verbose Trolling', true,
+ 'on', true, 'off', false),
+ trollToggle('debug', 'Detroll Mode', false,
+ 'on', true, 'off', false)
];