<commit_before><!DOCTYPE html>
<html lang="en-us">

    <head>

        <title>A Simple War App</title>
        
        <script type="text/javascript">


        var numCards = 52;
        var deckOne = [];
        var deckTwo = [];
        var deckOneCounter = 0;
        var deckTwoCounter = 0;
        var playerOneScore = 0;
        var playerTwoScore = 0;

        // Set the current card to be played
        var playerOneCurrentCard = deckOne[deckOneCounter];
        var playerTwoCurrentCard = deckTwo[deckTwoCounter];

        // Shuffle function using the Fisher-Yates Method
        function shuffleCards(array) {
                var counter = array.length;
                var temp;
                var index;

                while (counter > 0) {
                index = Math.floor(Math.random() * counter);

                counter--;

                temp = array[counter];
                array[counter] = array[index];
                array[index] = temp;
            }

            return array;
        }

        function draw() {
            console.log("Player One draws a card.");
            console.log(playerOneCurrentCard);

            console.log("Player Two draws a card.");
            console.log(playerTwoCurrentCard);

            // Compare the Two Cards to Determine Winner
            if (playerOneCurrentCard > playerTwoCurrentCard) {
                console.log("Player 1 Wins!");
                playerOneScore++;
            } else if (playerTwoCurrentCard > playerOneCurrentCard) {
                console.log("Player 2 Wins!");
                playerTwoScore++;
            } else {
                console.log("It's a tie!");
            }

            // Print the current Score
            console.log("The current score is: Player One: " + playerOneScore + " -  Player Two: " + playerTwoScore);

            // Increment the counters of each deck
            deckOneCounter++;
            deckTwoCounter++;

            // Take the next card on the deck to be the current card
            playerOneCurrentCard = deckOne[deckOneCounter];
            playerTwoCurrentCard = deckTwo[deckTwoCounter];

            //Determine winner if last card is pulled
            if (deckOneCounter === numCards){
                console.log("The game is over!  You're out of cards!");

                if (playerOneScore > playerTwoScore) {
                    console.log("Congratulations Player One, you're the Champion!");
                } else if (playerTwoScore > playerOneScore) {
                    console.log("Congratulations Player Two, you're the Champion!");
                } else {
                    console.log("Wow!  It's a tie!  Better play again!");
                }
            }

        }

        function reset(){

            console.log("");
            console.log("Starting New Game...");
            console.log("Shuffling Cards...");
            console.log("Reticulating Splines...");
            console.log("");

            // Shuffle the cards
            shuffleCards(deckOne);
            shuffleCards(deckTwo);

            // Reset the array counter to go back to beginning of deck
            deckOneCounter = 0;
            deckTwoCounter = 0;

            // Reset the overall scores
            playerOneScore = 0;
            playerTwoScore = 0;     
        }

        // Populate the decks

        for (var i=1; i<=numCards; i++){
            deckOne.push(i);
        }

        for (var i=1; i<=numCards; i++){
            deckTwo.push(i);
        }

        // Shuffle the cards
        shuffleCards(deckOne);
        shuffleCards(deckTwo);

        </script>

        <style type="text/css">
        </style>

    </head>

    <body>
        <h1>THIS IS (simple) WAR!!!</h1>

        <button onclick="draw()" id="draw" type="button">Draw!</button>
        <button onclick="reset()" id="reset" type="button">New Game</button>

    </body>
</html><commit_msg>Added Barebones CSS, Divs, and JS Text Updates<commit_after><!DOCTYPE html>
<html lang="en-us">

    <head>

        <title>A Simple War App</title>
        
        <script type="text/javascript">


        var numCards = 52;
        var deckOne = [];
        var deckTwo = [];
        var deckOneCounter = 0;
        var deckTwoCounter = 0;
        var playerOneScore = 0;
        var playerTwoScore = 0;

        // Set the current card to be played
        var playerOneCurrentCard;
        var playerTwoCurrentCard;

        // Shuffle function using the Fisher-Yates Method
        function shuffleCards(array) {
                var counter = array.length;
                var temp;
                var index;

                while (counter > 0) {
                index = Math.floor(Math.random() * counter);

                counter--;

                temp = array[counter];
                array[counter] = array[index];
                array[index] = temp;
            }

            return array;
        }

        function draw() {
            var output = document.getElementById("textDisplay");
            var outputP1 = document.getElementById("playerOneDisplay");
            var outputP2 = document.getElementById("playerTwoDisplay");

            console.log("Player One draws a card.");
            console.log(playerOneCurrentCard);
            outputP1.innerHTML = playerOneCurrentCard;

            console.log("Player Two draws a card.");
            console.log(playerTwoCurrentCard);
            outputP2.innerHTML = playerTwoCurrentCard;

            // Compare the Two Cards to Determine Winner
            if (playerOneCurrentCard > playerTwoCurrentCard) {
                output.innerHTML = "Player 1 Wins!";
                console.log("Player 1 Wins!");
                playerOneScore++;
            } else if (playerTwoCurrentCard > playerOneCurrentCard) {
                output.innerHTML = "Player 2 Wins!";
                console.log("Player 2 Wins!");
                playerTwoScore++;
            } else {
                output.innerHTML = "It's a tie!";
                console.log("It's a tie!");
            }

            // Print the current Score
            console.log("The current score is: Player One: " + playerOneScore + " -  Player Two: " + playerTwoScore);

            // Increment the counters of each deck
            deckOneCounter++;
            deckTwoCounter++;

            // Take the next card on the deck to be the current card
            playerOneCurrentCard = deckOne[deckOneCounter];
            playerTwoCurrentCard = deckTwo[deckTwoCounter];

            //Determine winner if last card is pulled
            if (deckOneCounter === numCards){
                console.log("The game is over!  You're out of cards!");

                if (playerOneScore > playerTwoScore) {
                    alert("Congratulations Player One, you're the Champion!");
                    console.log("Congratulations Player One, you're the Champion!");
                } else if (playerTwoScore > playerOneScore) {
                    console.log("Congratulations Player Two, you're the Champion!");
                    alert("Congratulations Player Two, you're the Champion!");
                } else {
                    console.log("Wow!  It's a tie!  Better play again!");
                    alert("Wow! It's a tie!  Better play again!");
                }
            }
        }

        function reset(){

            var output = document.getElementById("textDisplay");
            output.innerHTML = "Starting New Game...<br>Shuffling Cards...<br>Reticulating Splines...";

            console.log("");
            console.log("Starting New Game...");
            console.log("Shuffling Cards...");
            console.log("Reticulating Splines...");
            console.log("");

            // Shuffle the cards
            shuffleCards(deckOne);
            shuffleCards(deckTwo);

            // Reset the array counter to go back to beginning of deck
            deckOneCounter = 0;
            deckTwoCounter = 0;

            // Reset the overall scores
            playerOneScore = 0;
            playerTwoScore = 0;     
        }

        // Populate the decks

        for (var i=1; i<=numCards; i++){
            deckOne.push(i);
        }

        for (var i=1; i<=numCards; i++){
            deckTwo.push(i);
        }

        // Shuffle the cards
        shuffleCards(deckOne);
        shuffleCards(deckTwo);

        // Assign First Card on the deck
        playerOneCurrentCard = deckOne[deckOneCounter];
        playerTwoCurrentCard = deckTwo[deckTwoCounter];

        </script>

        <style type="text/css">
            body {
                font-family: Arial;
                background-color: #7EC0EE;
            }


            #playerOneDisplay {
                position: fixed;
                left: 100px;
                text-align: center;
                font-size: 100px;
                border: 1px solid red;
                width: 500px;
                height: 100px;
            }

           #playerTwoDisplay {
                position: fixed;
                left: 600px;
                text-align: center;
                font-size: 100px;
                border: 1px solid red;
                width: 500px;
                height: 100px;
            }

            #textDisplay {
                position: fixed;
                left: 100px;
                top: 200px;
                border: 1px solid red;
                width: 1000px;
                text-align: left;
            }

            .buttons {
                position: relative;
                top: 200px;
                left: 100px;
                width: 300px;
                height: 50px;
                font-size: 20px;
            }
        </style>

    </head>

    <body>
        <h1 style="text-align:center">THIS IS (simple) WAR!!!</h1>

        <div id="playerOneDisplay">0</div>
        <div id="playerTwoDisplay">0</div>
        <div id="textDisplay">Hello.  Press Draw to Begin!</div>

        <button class="buttons" onclick="draw()" id="draw" type="button">Draw!</button>
        <button class="buttons" onclick="reset()" id="reset" type="button">New Game</button>

    </body>
</html>
{'fraction_non_alphanumeric': 0.10473864191499756, 'fraction_numerical': 0.009184171958964338, 'mean_word_length': 1.460576923076923, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2076661', 'n_tokens_mistral': 2785, 'n_tokens_neox': 2486, 'n_words': 699}