function TypingTextManager() { this.init(); } TypingTextManager.prototype.init = function() { this.contents = []; } TypingTextManager.prototype.getContents = function() { return this.contents; } TypingTextManager.prototype.add = function(arr) { this.contents = this.contents.concat(arr); } TypingTextManager.prototype.slice = function(start, end) { this.contents = this.contents.slice(start, end); } TypingTextManager.prototype.getShuffledArray = function(arr) { return Phaser.ArrayUtils.shuffle(arr); } TypingTextManager.prototype.makePracticeContents = function(arr, repeatCount) { this.init(); this.add(arr); for(var i = 0; i < repeatCount; i++) { this.add(this.getShuffledArray(arr)); } } TypingTextManager.prototype.makeTestContents = function(arr) { this.init(); this.add(this.getShuffledArray(arr)); }