Add config.ts option to condigure messageQueue WPM

This commit is contained in:
Kristóf Tóth 2018-06-25 17:07:19 +02:00
parent 09823331d1
commit ee448a32c9
2 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,8 @@ export const config = {
},
messages: {
route: 'messages',
showNextButton: false
showNextButton: false,
messageQueueWPM: 150
},
console: {
route: 'console',

View File

@ -81,7 +81,7 @@ class MessageQueueAttender {
private lastMessageLength = 0;
private queue: MessagesMessage[] = [];
constructor(private messageEmitter: Observer<MessagesMessage>, wordPerMinute: number = 150) {
constructor(private messageEmitter: Observer<MessagesMessage>, wordPerMinute: number = config.messages.messageQueueWPM) {
const charPerMinute = wordPerMinute * 5;
this.charPerSecond = charPerMinute / 60;
}