diff --git a/app/main.js b/app/main.js index 5d5664d..43bc544 100644 --- a/app/main.js +++ b/app/main.js @@ -22,7 +22,6 @@ var pieceValues = { [game.QUEEN]: 9, [game.KING]: 1000, } -var gameStarted = false; // TODO: not fully working? I dont think it's calculating the piece values correctly. All board values are -1 when a rook/knight/etc. could be taken by white next turn var getBoardValue = function(move) { @@ -120,15 +119,13 @@ var onDrop = function (source, target) { removeGreySquares(); displayMoveHistory(game.history()); - if (!gameStarted) { - setSubtitle("Walked along the sand dunes of the Sahara desert for forty days and forty nights with nothing but a pack of Newports and a fifth of henny. I really do this shit."); - gameStarted = true; - } + setSubtitle(); window.setTimeout(makeBestMove, 1000); }; -var setSubtitle = function(text) { - document.getElementById("subtitle").textContent = text; +var setSubtitle = function() { + var draculaLine = window.draculaFlowLines[Math.floor(Math.random()*window.draculaFlowLines.length)] + document.getElementById("subtitle").textContent = draculaLine; } var onSnapEnd = function () { diff --git a/public/index.html b/public/index.html index 971365a..85c2a89 100644 --- a/public/index.html +++ b/public/index.html @@ -25,6 +25,7 @@

Chess

+ diff --git a/public/js/dracula.js b/public/js/dracula.js new file mode 100644 index 0000000..09adce1 --- /dev/null +++ b/public/js/dracula.js @@ -0,0 +1 @@ +window.draculaFlowLines = ["I'm him. I've been him. I will continue to be him."];