Closed ekt1701 closed 8 years ago
Hey. Thanks for catching this. I really ought have put these changes in a development branch. The project is in a broken state and I'm going to have to fix this. I'm prepping the game for larger caves, more items, more yeti, moving yeti (!), and better testing features. It will take a little more work.
Wow, your plans for the game sounds great! I will keep checking on the progress and testing it out.
I've uploaded the most recent commit (acea02c93b539f160afe2440b17473d2c133b2b4) (yes, it says "More cleaning and fixing and not testing"). It looks like it works. I'm going to double check some more when I have more sleep.
Since you are here, I thought I would discuss some new ideas:
I like your ideas, though can you allow the player to choose when to use the lantern? Wall blocks are good, it was fairly easy to make a mental picture of a 5x5 grid, but with random wall blocks, it will be more difficult. Of course a thumbs up for more and moving yeti.
One bug I found in the current commit acea02c. I gave myself several spears and whenever I throw a spear, I got this message:
if (session.attributes.game.isPlaying()) { var aDirection = intent.slots.Direction.value; session.attributes.game.launchSpear(aDirection); response.askSSML(session.attributes.game.getConsequence()
The game is still playing, so if I say move, the hunter will move. Only when I throw the last spear will I get the audio sound and whether or not I hit the yeti.
I was testing the latest version, installed fine, got the intro, began game, I got an error when I tried to move or throw. In the ASK console for the intent Move Hunter, this is the message:
2016-09-05T00:45:57.521Z 1bcfc9af-7302-11e6-b383-6d447718b97e session applicationId: amzn1.ask.skill.e299f832-250a-4416-9c68-5d5a1bdb9a2a 2016-09-05T00:45:57.521Z 1bcfc9af-7302-11e6-b383-6d447718b97e dispatch intent = MoveHunter 2016-09-05T00:45:57.521Z 1bcfc9af-7302-11e6-b383-6d447718b97e Unexpected exception TypeError: Cannot read property 'length' of undefined 2016-09-05T00:45:57.521Z 1bcfc9af-7302-11e6-b383-6d447718b97e {"errorMessage":"Cannot read property 'length' of undefined","errorType":"TypeError","stackTrace":["Cave.getSafeRooms (/var/task/model/Cave.js:309:26)","Cave.placeHunterInRandomSafeRoom (/var/task/model/Cave.js:325:26)","new Cave (/var/task/model/Cave.js:17:14)","new HuntTheYetiGame (/var/task/controller/HuntTheYetiGame.js:30:21)","HuntTheYetiSkill.moveHunter (/var/task/index.js:97:31)","HuntTheYetiSkill.intentHandlers.MoveHunter (/var/task/index.js:54:14)","AlexaSkill.eventHandlers.onIntent (/var/task/AlexaSkill.js:65:27)","AlexaSkill.requestHandlers.IntentRequest (/var/task/AlexaSkill.js:28:37)","AlexaSkill.execute (/var/task/AlexaSkill.js:105:24)","exports.handler (/var/task/index.js:169:17)"]}