This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UI comp | |
const startBtn = document.createElement("button"); | |
startBtn.innerHTML = "Start listening"; | |
const result = document.createElement("div"); | |
const processing = document.createElement("p"); | |
document.write("<body><h1>My Siri</h1><p>Give it a try with 'hello', 'how are you', 'what's your name', 'what time is it', 'stop', ... </p></body>"); | |
document.body.append(startBtn); | |
document.body.append(result); | |
document.body.append(processing); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PLAY = 1; | |
var END = 0; | |
var gameState = PLAY; | |
var trex, trex_running, trex_collided; | |
var ground, invisibleGround, groundImage; | |
var cloud, cloudsGroup, cloudImage; | |
var obstaclesGroup, obstacle1, obstacle2, obstacle3, obstacle4, obstacle5, obstacle6; |