Day 195

Working on a game for the grandkids... My take on simple-simmon.
#CodingPhase #TheCodingWay #365CodingPhaseChallenge

**********

<!DOCTYPE html>

<html>

    <head>
        <link rel="stylesheet" type="text/css" href="shapes.css">
        <title>Gramps' Simon</title>
    </head>

    <body>
        <div id="shape-board">
            <div id="shape00">
                <button id="cancel" onclick="setActiveControl(0)">Cancel</button>
                <button id="start" onclick="freebee()">Start</button>
                <button id="stop">Stop</button>
                <!-- <button id="btn-time"></button>
                If used, this will ask the user if they want the game to be timed
                <label id="lbl-time"></label> -->
                <label id="score">Score: </label>
                <label id="diff">Difficulty: </label>
            </div>
            <div class="shape0" id="shape0">
                <button type="button" class="gameload" id="play" onclick="setActiveControl(1)">Play</button>
                <button type="button" id="exit" onclick="window.location.href='http://games.smchosting.com/'">Exit</button>
                <button type="button" id="colors">Colors</button>
                <button type="button" id="math">Math</button>
                <button type="button" id="addsub">Add / Subtract</button>
                <button type="button" id="multdiv">Multiply / Divide</button>
                <button type="button" id="easy">Easy</button>
                <button type="button" id="medium">Medium</button>
                <button type="button" id="hard">Hard</button>
                <label id="or"> or </label>
                <label id="decide">You prefer to play?</label>
                <label id="score">Score: </label>
            </div>
            <div class="gameload" id="shape1"></div>
            <div class="gameload" id="shape2"></div>
            <div class="gameload" id="shape3"></div>
            <div class="gameload" id="shape4"></div>
            <div class="gameload" id="shape5"></div>
            <div class="gameload" id="shape6"></div>
            <div class="gameload" id="shape7"></div>
            <div class="gameload" id="shape8"></div>
            <div class="gameload" id="shape9"></div>
        </div>

        <script>

      if (document.getElementById('play')) && (class == gameload)  // broken
      {

      }

            function setActiveControl(control)
            {
                if (control == 0)
                {
                    document.getElementById('shape0').setAttribute("class", "shapeon");
                    document.getElementById('shape00').setAttribute("class", "shapeoff");
                }
                else
                {
                    document.getElementById('shape0').setAttribute("class", "shapeoff");
                    document.getElementById('shape00').setAttribute("class", "shapeon");
                }
            }           

            function freebee()
            {
                alert("My eye hurts. This is my cheat day of coding, Oct 30 2018...Thank you Joe from codingphase.com");
            }       

        </script>
    </body>
</html>

Comments

Popular posts from this blog

Day 184

Day 2

Day 188