Daily Archives: August 23, 2026

Dominoes Horizontal Blocked Game Tutorial

Playing a Dominoes Horizontal Block Game after yesterday’s Dominoes Horizontal Block Game Handoff Friendly Tutorial was where we realized you could have a “stalemate” (in chess parlance) in a Dominoes game, as per “what is stalemate called in a dominoes game” … A stalemate in dominoes is most commonly called a blocked game or a locked game, and the layout itself is referred to as being blocked or closed. … where a user cannot play themselves and there are no Domino tiles left in the stock. And now that yesterday saw us continuously hashtagging the game status, some web browser address bar URL refreshing would land you back into the same pickle. And so … we turned a hardcopy into a span, potentially dynamic, element … <h1 id=myh1>Dominoes Horizontal Block <span id=sgame>Game</span></h1> that when detecting the stock is empty … if (eval(” + document.getElementById(‘thstock’).innerHTML.split(‘none;’).length) >= 14) { if (document.getElementById(‘sgame’).innerHTML == ‘Game’) { document.getElementById(‘sgame’).innerHTML='<button title=” … or blocked game” onclick=newstockgame();>New</button> Game’; } } … has the capacity to call a new Javascript function … function newstockgame() { location.href=document.URL.split(‘?’)[0].split(‘#’)[0] + ‘?rand=’ + Math.floor(Math.random() * 1989786) + ‘&score1=’ + document.getElementById(‘score1’).innerHTML.replace(‘Score: ‘,”) + ‘&score2=’ + document.getElementById(‘score2’).innerHTML.replace(‘Score: ‘,”); } … to “exit the pickle”, available now, to a user reaching the stalemateblocked game scenario … in the changed eleventh draft Dominoes Block Game you can try below. Previous relevant Dominoes Horizontal Block Game Handoff Friendly Tutorial is shown below. After yesterday’s Dominoes Horizontal Block Game Mobile Speech to Text Tutorial we started delving more into Apple’s Handoff concepts here sharing between an iPhone and a MacBook Air … on same WiFi network Bluetooth on … and found that “for dynamic updating sake” we needed to “borrow” from how we were shaping to share with email or SMS, and use that similar hashtagging “state of play” simulations to the document.URL scenarios as the game is playing, via, at the relevant points of time, after the global var prevlhis=”, lhis=”; initialization, that is … lhis=’#’ + encodeURIComponent(document.body.innerHTML); prevlhis=lhis; location.href=lhis; … as a way to tell Handoff, if used, situations in the Domino game had changed. Also, we needed to, at document.body onload, code … lhis=(” + location.hash); prevlhis=lhis; setInterval(lhcheck, 5000); … utilizing new Javascript function … function lhcheck() { lhis=(” + location.hash); if (prevlhis != lhis) { prevlhis=lhis; if (document.URL.indexOf(‘#’ + encodeURIComponent(‘<h1’)) != -1 || document.URL.indexOf(‘#’ + encodeURIComponent(String.fromCharCode(10) + ‘<h1’)) != -1 || document.URL.indexOf(‘#’ + encodeURIComponent(‘<t’)) != … Continue reading →

Posted in eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment