Adventure Choices V3

- Matrix style

by m4xout

HTML

<div>You are standing in a clearing</div>
<div id="question"></div>
<div id="answers"></div>
<div>What do you want to do?</div>

CSS

body {
  color: rgb(51, 255, 102);
    font-weight: normal;
    font-family: Lucida Console, Courier, Monotype;
    font-size: 10pt;
    text-align: left;
    background:#222;
    padding: 15px;
    margin: 15px;
}

JavaScript

var db = [
    {
        "question":"You just woke up, the world is your oyster... What are you going to do first?",
        "answers":[
            {"title":"Something fun","response":1},
            {"title":"Something healthy","response":2},
            {"title":"Something fun and healthy","response":3},
            {"title":"Something boring","response":4},
            {"title":"Cheat","response":5},
            {"title":"Start Over","response":0}
            ]
    },
    { 
    // Item 1
        "question":"Do any of these things seem like the right thing to do?",
        "answers":[
            {"title":"Surfing","response":7},
            {"title":"Xbox","response":0}
            ]
    },
    {
    // Item 2
        "question":"You are in the North, There is one exit",
        "answers":[
            {"title":"South","response":0}
            ]
    },
    {
    // Item 3
        "question":"You are in the West, There are two exits.",
        "answers":[
            {"title":"East","response":0},
            {"title":"West","response":5}
            ]
    },
    {
    // Item 4
        "question":"You are in the East, There is one exit",
        "answers":[
            {"title":"West","response":0}
            ]
    },
    {
    // Item 5
        "question":"You are the winner!",
        "answers":[
            {"title":"Start Over","response":0}
        ]
    },
    {
    // Item 6
        "question":"You are the winner!",
        "answers":[
            {"title":"Start Over","response":0}
        ]
    },
    
        {
    // Item 7
        "question":"Things to remember when going for a surf! <ul><li>Stretch</li><li>Hydrate</li><li>Be smart and patient with wave selection</li><li>Find a mark on shore to keep good positioning</li></ul>",
        "answers":[
            {"title":"Start Over","response":0}
        ]
    }
    
    ];

var currentLocation = 0;

window.printCurrentLocation = function(){
    document.getElementById("question").innerHTML =...