-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
677 lines (584 loc) · 20.7 KB
/
index.js
File metadata and controls
677 lines (584 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
/* eslint-disable func-names */
/* eslint-disable no-console */
const Alexa = require('ask-sdk-core');
//const questions = require('./questions');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');
const Game = require('./game');
function getSlotValues(filledSlots) {
//given event.request.intent.slots, a slots values object so you have
//what synonym the person said - .synonym
//what that resolved to - .resolved
//and if it's a word that is in your slot values - .isValidated
const slotValues = {};
//console.log('The filled slots: ' + JSON.stringify(filledSlots));
Object.keys(filledSlots).forEach(function(item) {
//console.log("item in filledSlots: "+JSON.stringify(filledSlots[item]));
var name = filledSlots[item].name;
//console.log("name: "+name);
if (filledSlots[item] &&
filledSlots[item].resolutions &&
filledSlots[item].resolutions.resolutionsPerAuthority[0] &&
filledSlots[item].resolutions.resolutionsPerAuthority[0].status &&
filledSlots[item].resolutions.resolutionsPerAuthority[0].status.code) {
switch (filledSlots[item].resolutions.resolutionsPerAuthority[0].status.code) {
case "ER_SUCCESS_MATCH":
slotValues[name] = {
"synonym": filledSlots[item].value,
"resolved": filledSlots[item].resolutions.resolutionsPerAuthority[0].values[0].value.name,
"isValidated": true
};
break;
case "ER_SUCCESS_NO_MATCH":
slotValues[name] = {
"synonym": filledSlots[item].value,
"resolved": filledSlots[item].value,
"isValidated": false
};
break;
}
} else {
slotValues[name] = {
"synonym": filledSlots[item].value,
"resolved": filledSlots[item].value,
"isValidated": false
};
}
}, this);
//console.log("slot values: " + JSON.stringify(slotValues));
return slotValues;
}
function getGame(anotherObj) {
const game = new Game();
Object.assign(game, anotherObj);
/*game.Board = anotherObj.Board;
game.UserMark = anotherObj.UserMark;
game.UserX = anotherObj.UserX;
game.UserY = anotherObj.UserY;*/
return game;
}
function executeMove(game, move) {
//let x = point["x"];
//let y = point["y"];
if (move === "east") {
return game.Travel(0, 1);
}
else if (move === "west") {
return game.Travel(0, -1);
}
else if (move === "north") {
return game.Travel(1, 0);
}
else if (move === "south") {
return game.Travel(-1, 0);
}
else if (move === "northwest") {
return game.Travel(1, -1);
}
else if (move === "northeast") {
return game.Travel(1, 1);
}
else if (move === "southwest") {
return game.Travel(-1, -1);
}
else if (move === "southeast") {
return game.Travel(-1, 1);
}
else {
return -1;//invalid
}
}
function startGame(handlerInput) {//newGame, handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
/*
let speechOutput = newGame
? requestAttributes.t('NEW_GAME_MESSAGE', requestAttributes.t('GAME_NAME'))
+ requestAttributes.t('WELCOME_MESSAGE', GAME_LENGTH.toString())
: '';
const translatedQuestions = requestAttributes.t('QUESTIONS');
const gameQuestions = populateGameQuestions(translatedQuestions);
const correctAnswerIndex = Math.floor(Math.random() * (ANSWER_COUNT));
const roundAnswers = populateRoundAnswers(
gameQuestions,
0,
correctAnswerIndex,
translatedQuestions
);
const currentQuestionIndex = 0;
const spokenQuestion = Object.keys(translatedQuestions[gameQuestions[currentQuestionIndex]])[0];
let repromptText = requestAttributes.t('TELL_QUESTION_MESSAGE', '1', spokenQuestion);
for (let i = 0; i < ANSWER_COUNT; i += 1) {
repromptText += `${i + 1}. ${roundAnswers[i]}. `;
}
*/
const repromptText = "To open the game manual at any time, just say help.";
const speechOutput = requestAttributes.t('NEW_GAME_MESSAGE', requestAttributes.t('GAME_NAME'))
+ requestAttributes.t('WELCOME_MESSAGE');
const sessionAttributes = {};
//const translatedQuestion = translatedQuestions[gameQuestions[currentQuestionIndex]];
const game = new Game();
game.SetUpBoard(25);
Object.assign(sessionAttributes, {
speechOutput: repromptText,
repromptText,
state: 'inSession',
game
/*
currentQuestionIndex,
correctAnswerIndex: correctAnswerIndex + 1,
questions: gameQuestions,
score: 0,
correctAnswerText: translatedQuestion[Object.keys(translatedQuestion)[0]][0]
*/
});
handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder
.speak(speechOutput)
.reprompt(repromptText)
.withSimpleCard(requestAttributes.t('GAME_NAME'), repromptText)
.getResponse();
}
/*
function helpTheUser(newGame, handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const askMessage = newGame
? requestAttributes.t('ASK_MESSAGE_START')
: requestAttributes.t('REPEAT_QUESTION_MESSAGE') + requestAttributes.t('STOP_MESSAGE');
const speechOutput = requestAttributes.t('HELP_MESSAGE', GAME_LENGTH) + askMessage;
const repromptText = requestAttributes.t('HELP_REPROMPT') + askMessage;
return handlerInput.responseBuilder.speak(speechOutput).reprompt(repromptText).getResponse();
}
*/
function sessionHelp(handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
//const askMessage = requestAttributes.t('STOP_MESSAGE');
const speechOutput = requestAttributes.t('HELP_MESSAGE');// + askMessage;
const repromptText = requestAttributes.t('HELP_REPROMPT');// + askMessage;
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
Object.assign(sessionAttributes, {
speechOutput,
repromptText
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder.speak(speechOutput).reprompt(repromptText).getResponse();
}
function endHelp(handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const askMessage = requestAttributes.t('ASK_MESSAGE_START');
const speechOutput = 'No game is in progress. ' + askMessage;
const repromptText = askMessage;
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
Object.assign(sessionAttributes, {
speechOutput,
repromptText
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder.speak(speechOutput).reprompt(repromptText).getResponse();
}
function sessionUhandled(handlerInput) {
const speechOutput = "To open the game manual at any time, just say help.";//requestAttributes.t('TRIVIA_UNHANDLED', ANSWER_COUNT.toString());
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
Object.assign(sessionAttributes, {
speechOutput,
repromptText: speechOutput
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.attributesManager
.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
}
function sessionWhereAmI(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
const g = sessionAttributes.game;
//const game = getGame(g);
if (g.UserX == 0 && g.UserY == 0) {
const speechOutput = "You are currently at zero zero. Command is northeast at fourteen eight.";
Object.assign(sessionAttributes, {
speechOutput,
repromptText: speechOutput
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
}
else {
const speechOutput = `You are currently at ${g.UserX} ${g.UserY}. Command is northeast at fourteen eight.`;
Object.assign(sessionAttributes, {
speechOutput,
repromptText: speechOutput
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
}
}
function sessionMove(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const slotValues = getSlotValues(handlerInput.requestEnvelope.request.intent.slots);
if (slotValues["direction"]) {
const g = sessionAttributes.game;
const game = getGame(g);
//console.log(JSON.stringify(game));
const result = executeMove(game, slotValues["direction"]["resolved"]);
//console.log(`The result is ${result}`);
//if (result) {
//TODO CHANGE MESSAGE, INTRODUCE WHERE AM I
let speechOutput;
let gameOver = false;
switch (result) {
case 1:
speechOutput = 'Sorry, you can\'t move there.';
break;
case 2:
speechOutput = 'KABOOM! You stepped on a bomb! Thanks for playing!';
gameOver = true;
break;
case 3:
speechOutput = 'You won! You arrive at Command and are awarded the medal of Minding The Field. Thanks for playing!';
gameOver = true;
break;
case 4:
//console.log('BIG FOO');
const mineCount = game.CountMines();
//console.log('GOOD FOO');
speechOutput = `You are now at ${game.UserY} ${game.UserX}. Beep beep. ${mineCount} mines in proximity.`;// + m_lang.ASK_MOVE;
break;
default:
speechOutput = 'Please say a valid move.';
}
if (gameOver) {
Object.assign(sessionAttributes, {
state: 'gameEnded',
game: null,
speechOutput,
repromptText: speechOutput
});
}
else {
Object.assign(sessionAttributes, {
state: 'inSession',
game,
speechOutput,
repromptText: speechOutput
});
}
//console.log(JSON.stringify(game));
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder
.speak(speechOutput)
.reprompt(speechOutput)
//.withSimpleCard(m_lang.GAME_NAME, speechOutput)
.withSimpleCard(requestAttributes.t('GAME_NAME'), speechOutput)
.getResponse();
//}
}
//TODO INVALID MOVE?
return sessionUhandled(handlerInput);
}
function sessionCountMines(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
const g = sessionAttributes.game;
const mineCount = g.MineCount;
const speechOutput = `Beep beep. ${mineCount} mines in proximity.`;
Object.assign(sessionAttributes, {
speechOutput,
repromptText: speechOutput
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.responseBuilder.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
}
/* jshint -W101 */
const languageString = {
en: {
translation: {
//QUESTIONS: questions.QUESTIONS_EN_US,
GAME_NAME: 'Mind Field',
HELP_MESSAGE: 'To get your coordinates, ask where am I? To use your mine detector, ask how many mines are near me? Once you have decided which direction to move, say move and specify any of the eight compass directions. For example, to move north, say move north. What would you like to do? ',
//REPEAT_QUESTION_MESSAGE: 'To repeat the last question, say, repeat. ',
ASK_MESSAGE_START: 'Would you like to start playing?',
HELP_REPROMPT: 'To listen to the game manual again, say repeat. ',
STOP_MESSAGE: 'Would you like to keep playing?',
CANCEL_MESSAGE: 'Ok, let\'s play again soon.',
NO_MESSAGE: 'Ok, if you ever want to mind the field, just say: Alexa open Mind Field!',//we\'ll play another time. Goodbye!',
//TRIVIA_UNHANDLED: 'Try saying a number between 1 and %s',
HELP_UNHANDLED: 'Say yes to continue, or no to end the game.',
START_UNHANDLED: 'Say start to start a new game.',
NEW_GAME_MESSAGE: 'Welcome to %s. ',
WELCOME_MESSAGE: 'Your mission, should you choose to accept it, is to deliver a message to Command. However, there are mines in your way. So you will have to mind the field. You have a mine detector that tells you the number of adjacent mines. Also, to open the game manual at any time, just say help. Let\'s begin. ',
ANSWER_CORRECT_MESSAGE: 'correct. ',
ANSWER_WRONG_MESSAGE: 'wrong. ',
CORRECT_ANSWER_MESSAGE: 'The correct answer is %s: %s. ',
ANSWER_IS_MESSAGE: 'That answer is ',
TELL_QUESTION_MESSAGE: 'Question %s. %s ',
GAME_OVER_MESSAGE: 'You got %s out of %s questions correct. Thank you for playing!',
SCORE_IS_MESSAGE: 'Your score is %s. '
},
},
};
const localizationClient = i18n.use(sprintf).init({
lng: 'en',
overloadTranslationOptionHandler: sprintf.overloadTranslationOptionHandler,
resources: languageString,
returnObjects: true
});
const my_t_func = function (...args) {
return localizationClient.t(...args);
};
const LocalizationInterceptor = {
process(handlerInput) {
const attributes = handlerInput.attributesManager.getRequestAttributes();
attributes.t = my_t_func;
},
};
const myStates = {
inSession: {
help: sessionHelp,
uhandled: sessionUhandled,
whereAmI: sessionWhereAmI,
move: sessionMove,
minesAdjacent: sessionCountMines
},
gameEnded: {
help: endHelp,
uhandled: endHelp,
whereAmI: endHelp,
move: endHelp,
minesAdjacent: endHelp
}
};
const LaunchRequest = {
canHandle(handlerInput) {
const { request } = handlerInput.requestEnvelope;
return request.type === 'LaunchRequest'
|| (request.type === 'IntentRequest'
&& request.intent.name === 'AMAZON.StartOverIntent');
},
handle(handlerInput) {
/*
const attributes = handlerInput.attributesManager.getRequestAttributes();
attributes.t = function (...args) {
return localizationClient.t(...args);
};
*/
return startGame(handlerInput);
},
};
const HelpIntent = {
canHandle(handlerInput) {
const { request } = handlerInput.requestEnvelope;
return request.type === 'IntentRequest' && request.intent.name === 'AMAZON.HelpIntent';
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
return myStates[sessionAttributes.state].help(handlerInput);
//const newGame = !(sessionAttributes.questions);
//return helpTheUser(newGame, handlerInput);
},
};
const UnhandledIntent = {
canHandle() {
return true;
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
if (Object.keys(sessionAttributes).length === 0) {
const speechOutput = requestAttributes.t('START_UNHANDLED');
return handlerInput.attributesManager
.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
} else if (sessionAttributes.state) {
return myStates[sessionAttributes.state].uhandled(handlerInput);
}
const speechOutput = requestAttributes.t('HELP_UNHANDLED');
return handlerInput.attributesManager.speak(speechOutput).reprompt(speechOutput).getResponse();
},
};
const SessionEndedRequest = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'SessionEndedRequest';
},
handle(handlerInput) {
console.log(`Session ended with reason: ${handlerInput.requestEnvelope.request.reason}`);
return handlerInput.responseBuilder.getResponse();
},
};
const WhereAmIIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& (handlerInput.requestEnvelope.request.intent.name === 'WhereAmI');
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
return myStates[sessionAttributes.state].whereAmI(handlerInput);
}
};
const MoveIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'Move';
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
return myStates[sessionAttributes.state].move(handlerInput);
}
};
const MinesAdjacentIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'MinesAdjacent';
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
return myStates[sessionAttributes.state].minesAdjacent(handlerInput);
}
};
/*
const AnswerIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& (handlerInput.requestEnvelope.request.intent.name === 'AnswerIntent'
|| handlerInput.requestEnvelope.request.intent.name === 'DontKnowIntent');
},
handle(handlerInput) {
//guess attempt
if (handlerInput.requestEnvelope.request.intent.name === 'AnswerIntent') {
return handleUserGuess(false, handlerInput);
}
//don't know
return handleUserGuess(true, handlerInput);
},
};
*/
const RepeatIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.RepeatIntent';
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
if (sessionAttributes.speechOutput) {
if (sessionAttributes.repromptText) {
return handlerInput.responseBuilder.speak(sessionAttributes.speechOutput)
.reprompt(sessionAttributes.repromptText)
.getResponse();
}
else {
return handlerInput.responseBuilder.speak(sessionAttributes.speechOutput)
.getResponse();
}
}
else {
return handlerInput.responseBuilder.speak('Sorry, there is nothing to repeat.')
.reprompt('Sorry, there is nothing to repeat.')
.getResponse();
}
},
};
const YesIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.YesIntent';
},
handle(handlerInput) {
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
//repeat
//strike the above comment
if (sessionAttributes.state === 'inSession') {
const speechOutput = "To open the game manual at any time, just say help.";//requestAttributes.t('TRIVIA_UNHANDLED', ANSWER_COUNT.toString());
const sessionAttributes = handlerInput.attributesManager.getSessionAttributes();
Object.assign(sessionAttributes, {
speechOutput,
repromptText: speechOutput
});
//handlerInput.attributesManager.setSessionAttributes(sessionAttributes);
return handlerInput.attributesManager
.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
/*
return handlerInput.responseBuilder.speak(sessionAttributes.speechOutput)
.reprompt(sessionAttributes.repromptText)
.getResponse();
*/
}
//starts game without tutorial/introduction ? (I think)
//strike above, removed boolean arg
return startGame(handlerInput);
},
};
const StopIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.StopIntent';
},
handle(handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const speechOutput = requestAttributes.t('STOP_MESSAGE');
return handlerInput.responseBuilder.speak(speechOutput)
.reprompt(speechOutput)
.getResponse();
},
};
const CancelIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.CancelIntent';
},
handle(handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const speechOutput = requestAttributes.t('CANCEL_MESSAGE');
return handlerInput.responseBuilder.speak(speechOutput)
.getResponse();
},
};
const NoIntent = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.NoIntent';
},
handle(handlerInput) {
const requestAttributes = handlerInput.attributesManager.getRequestAttributes();
const speechOutput = requestAttributes.t('NO_MESSAGE');
return handlerInput.responseBuilder.speak(speechOutput).getResponse();
},
};
const ErrorHandler = {
canHandle() {
return true;
},
handle(handlerInput, error) {
console.log(`Error handled: ${error.message}`);
return handlerInput.responseBuilder
.speak('Sorry, I can\'t understand the command. Please say again.')
.reprompt('Sorry, I can\'t understand the command. Please say again.')
.getResponse();
},
};
const skillBuilder = Alexa.SkillBuilders.custom();
exports.handler = skillBuilder
.addRequestHandlers(
LaunchRequest,
HelpIntent,
WhereAmIIntent,
MoveIntent,
MinesAdjacentIntent,
//AnswerIntent,
RepeatIntent,
YesIntent,
StopIntent,
CancelIntent,
NoIntent,
SessionEndedRequest,
UnhandledIntent
)
.addRequestInterceptors(LocalizationInterceptor)
.addErrorHandlers(ErrorHandler)
.lambda();