Skip to content

Instantly share code, notes, and snippets.

Avatar

Jacob Makarsky jacobmakarsky

View GitHub Profile
View Game.js
function showTextNode(textNodeIndex) {
const textNode = textNodes.find(textNode => textNode.id === textNodeIndex)
textElement.innerText = textNode.text
while (optionButtonsElement.firstChild) {
optionButtonsElement.removeChild(optionButtonsElement.firstChild)
}
textNode.options.forEach(option => {
if (showOption(option)) {
const button = document.createElement('button')
You can’t perform that action at this time.