public/js-roguelike-skeleton/src/console.js
function Console(game, messageHistoryCount, elClassName) {
        this.el = document.createElement('div');
        this.el.className = elClassName || 'console';
        this.messageHistoryCount = messageHistoryCount || this.messageHistoryCount;
        this.game = game;
    }
function Console(game, messageHistoryCount, elClassName) {
        this.el = document.createElement('div');
        this.el.className = elClassName || 'console';
        this.messageHistoryCount = messageHistoryCount || this.messageHistoryCount;
        this.game = game;
    }
function Console ( game , messageHistoryCount , elClassName ) { this . el = document . createElement ( 'div' ) ; this . el . className = elClassName || 'console' ; this . messageHistoryCount = messageHistoryCount || this . messageHistoryCount ; this . game = game ; }
Manages the display and history of console messages to the user.
"The troll hits you dealing 10 damage."
"You die."
@class Console
@constructor
@param {Game} game - Game instance this obj is attached to.
@param {Number} [messageHistoryCount=5] - Number of messages to display at once.
@param {String} [elClassName='console'] - Css class name to assign to the console element.
Manages the display and history of console messages to the user . The troll hits you dealing 10 damage . You die .