JSFiddle - React, Tailwind, and code Playground

by twistedinferno

JavaScript

function Stadium() {
    this.lightEastStand = false;
    this.lightWestStand = false;
    this.lightNorthStand = false;
    this.lightSouthStand = false;
}

Stadium.prototype = {
    _switchOnAllLights: function () {
        this.lightEastStand = true;
        this.lightNorthStand = true;
        this.lightSouthStand = true;
        this.lightWestStand = true;
    },

    openDoors: function () {
        //openEastDoor();
        //openbackDoor();
        this._switchOnAllLights();
    },

    startMatch: function () {
        //startCameras()
        //displayScoreBoard()
        this._switchOnAllLights();
    },

    duskStarts: function () {
        //lockMainEntrance();
        this._switchOnAllLights();
    }
}

var myStadium = new Stadium();
document.write(myStadium.lightEastStand);
myStadium.openDoors();
document.write(myStadium.lightEastStand);