/Alexa-Game

Primary LanguageJavaScript

Alexa Kings Cup

Alexa Kings Cup is a social hydration game based on the popular party game King's Cup. You can view our demo page here!

Features

  • Initiate skill with wake word.
  • Users can verbally ask for a card.
  • Alexa will respond with card rules and associated sound effect or music.
  • Players can ask for help if clarification is needed.

Technology

This skill was created using the AWS platform.

  "intents": [
    {
      "name": "AMAZON.CancelIntent",
      "samples": []
    },
    {
      "name": "AMAZON.HelpIntent",
      "samples": []
    },
    {
      "name": "AMAZON.StartOverIntent",
      "samples": []
    },
    {
      "name": "AMAZON.StopIntent",
      "samples": []
    },
    {
      "name": "NextCardIntent",
      "samples": [
        "draw",
        "next",
        "draw card",
        "next card"
      ],
      "slots": []
    }
  ]
}
kingsCup.launch(function(req, res) {
  res.session("cards", cards);
  var Speech = require("ssml-builder");
  var choices = [
    "https://s3.us-east-2.amazonaws.com/alexakingscup/Alexa20thCenturyFlute.mp3",
    "https://s3.us-east-2.amazonaws.com/alexakingscup/yakety.mp3",
    "https://s3.us-east-2.amazonaws.com/alexakingscup/AlexaJurassicParkFlute.mp3"
  ];
  var randSound = choices[Math.floor(Math.random() * choices.length)];
  var speech = new Speech()
    .say("Welcome To Kings Cup!. To draw a card say next or draw")
    .audio(`${randSound}`);
  var speechOutput = speech.ssml(true);
  res.say(speechOutput);
  res.shouldEndSession(false);
});
  • Node.js was the language that we chose to write our code in, which allowed for seamless integration with AWS lambda.

  • The alexa-app node package was also used.

Future Features

  • A DynamoDB backend to store the deck over multiple sessions