{"id":3204,"date":"2024-11-21T13:05:09","date_gmt":"2024-11-21T12:05:09","guid":{"rendered":"https:\/\/athlenergy.com\/?page_id=3204"},"modified":"2024-11-21T13:10:39","modified_gmt":"2024-11-21T12:10:39","slug":"5000-goal-challenge","status":"publish","type":"page","link":"https:\/\/athlenergy.com\/5000-goal-challenge\/","title":{"rendered":"5000 goal challenge"},"content":{"rendered":"\n\n\n\n \n \n Goal Challenge<\/title>\n <style>\n body {\n font-family: Helvetica, sans-serif;\n text-align: Left;\n background-color: #f0f0f0; \/* Light gray background for contrast *\/\n margin: 0;\n padding: 0;\n }\n\n #game {\n background-color: white;\n width: calc(100% - 64px); \/* Ensure the card is wide enough *\/\n max-width: 400px; \/* Limit maximum width *\/\n margin: 50px auto; \/* Center the card and give some space on top *\/\n padding: 32px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); \/* Subtle shadow *\/\n border-radius: 8px;\n }\n\n button {\n margin: 5px;\n padding: 10px 20px;\n font-size: 16px;\n border-radius: 100px;\n border: 0px solid #ccc;\n background-color: #88e788;\n cursor: pointer;\n }\n\n #spots {\n display: inline-block;\n text-align: left;\n margin-top: 20px;\n }\n\n #spots button {\n display: block;\n margin: 5px 0;\n background: none;\n border: none;\n padding: 0;\n color: #007bff;\n font: inherit;\n cursor: pointer;\n text-align: left;\n }\n\n button:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n #playAgainButton {\n display: none;\n margin-top: 20px;\n }\n <\/style>\n<\/head>\n<body>\n <div id=\"game\">\n <h1> 5000 Goal Challenge<\/h1>\n <button id=\"playButton\" onclick=\"play()\">Play<\/button>\n\n <div id=\"playerInfo\"><\/div>\n \n <div id=\"spots\">\n <h3 id=\"place-player\">Place Player:<\/h3>\n <button id=\"career1\" onclick=\"placePlayer('career1')\">Career 1: <\/button>\n <button id=\"career2\" onclick=\"placePlayer('career2')\">Career 2: <\/button>\n <button id=\"career3\" onclick=\"placePlayer('career3')\">Career 3: <\/button>\n <button id=\"double1\" onclick=\"placePlayer('double1')\">Double 1: <\/button>\n <button id=\"double2\" onclick=\"placePlayer('double2')\">Double 2: <\/button>\n <button id=\"double3\" onclick=\"placePlayer('double3')\">Double 3: <\/button>\n <button id=\"triple1\" onclick=\"placePlayer('triple1')\">Triple 1: <\/button>\n <button id=\"triple2\" onclick=\"placePlayer('triple2')\">Triple 2: <\/button>\n <button id=\"quad\" onclick=\"placePlayer('quad')\">Quad: <\/button>\n <button id=\"xfive\" onclick=\"placePlayer('xfive')\">Xfive: <\/button>\n <\/div>\n\n <div id=\"result\"><\/div>\n <button id=\"playAgainButton\" onclick=\"playAgain()\">Play Again<\/button>\n <\/div>\n\n <script>\n let players = [\n { name: \"Mohamed Salah\", goals: 300 },\n { name: \"Harry Kane\", goals: 275 },\n { name: \"Kevin De Bruyne\", goals: 90 },\n { name: \"Virgil van Dijk\", goals: 50 },\n { name: \"Bruno Fernandes\", goals: 150 },\n { name: \"Son Heung-min\", goals: 140 },\n { name: \"Raheem Sterling\", goals: 160 },\n { name: \"Jack Grealish\", goals: 50 },\n { name: \"Jamie Vardy\", goals: 175 },\n { name: \"Trent Alexander-Arnold\", goals: 15 },\n { name: \"Ederson\", goals: 1 },\n { name: \"Ruben Dias\", goals: 10 },\n { name: \"Bernardo Silva\", goals: 65 },\n { name: \"Jadon Sancho\", goals: 60 },\n { name: \"James Maddison\", goals: 60 },\n { name: \"Mason Mount\", goals: 35 },\n { name: \"Declan Rice\", goals: 15 },\n { name: \"Romelu Lukaku\", goals: 350 },\n { name: \"Richarlison\", goals: 90 },\n { name: \"Phil Foden\", goals: 35 },\n { name: \"Pierre-Emerick Aubameyang\", goals: 300 },\n { name: \"Bukayo Saka\", goals: 30 },\n { name: \"Marcus Rashford\", goals: 130 },\n { name: \"Thiago Silva\", goals: 50 },\n { name: \"Kai Havertz\", goals: 75 },\n { name: \"Thierry Henry\", goals: 360 },\n { name: \"Alan Shearer\", goals: 409 },\n { name: \"Eric Cantona\", goals: 165 },\n { name: \"Patrick Vieira\", goals: 50 },\n { name: \"Frank Lampard\", goals: 300 },\n { name: \"Steven Gerrard\", goals: 200 },\n { name: \"Wayne Rooney\", goals: 366 },\n { name: \"David Beckham\", goals: 115 },\n { name: \"Dennis Bergkamp\", goals: 272 },\n { name: \"John Terry\", goals: 67 },\n { name: \"Ryan Giggs\", goals: 168 },\n { name: \"Roy Keane\", goals: 50 },\n { name: \"Didier Drogba\", goals: 300 },\n { name: \"Peter Schmeichel\", goals: 13 },\n { name: \"Cesc Fabregas\", goals: 125 },\n { name: \"Nemanja Vidic\", goals: 20 },\n { name: \"Robin van Persie\", goals: 274 },\n { name: \"Fernando Torres\", goals: 262 },\n { name: \"Michael Owen\", goals: 223 },\n { name: \"Paul Scholes\", goals: 155 },\n { name: \"Gianfranco Zola\", goals: 193 },\n { name: \"Sol Campbell\", goals: 20 },\n { name: \"Ashley Cole\", goals: 20 },\n { name: \"Rio Ferdinand\", goals: 15 },\n { name: \"Yaya Toure\", goals: 100 }\n ];\n\n let selectedPlayer = null;\n let playerSpots = {};\n let clicks = 10;\n let gameStarted = false;\n\n function play() {\n if (!gameStarted) {\n startGame();\n selectPlayer(); \/\/ Immediately select a player after starting the game\n gameStarted = true;\n } else {\n selectPlayer();\n document.getElementById('playButton').disabled = true;\n }\n }\n\n function startGame() {\n playerSpots = {\n career1: null, career2: null, career3: null,\n double1: null, double2: null, double3: null,\n triple1: null, triple2: null,\n quad: null,\n xfive: null\n };\n document.getElementById('result').innerText = '';\n document.querySelectorAll('#spots button').forEach(button => button.innerHTML = button.innerHTML.split(':')[0] + ': ');\n document.getElementById('playAgainButton').style.display = 'none';\n document.getElementById('playButton').disabled = false;\n alert(\"Game Started!\");\n }\n\n function selectPlayer() {\n if (clicks > 0) {\n let randomIndex = Math.floor(Math.random() * players.length);\n selectedPlayer = players[randomIndex];\n document.getElementById('playerInfo').innerHTML = \n `Selected: ${selectedPlayer.name} with ${selectedPlayer.goals} goals`;\n clicks--;\n } else {\n alert(\"You have used all your selections.\");\n }\n }\n\n function placePlayer(spot) {\n if (selectedPlayer && !playerSpots[spot]) {\n let multiplier;\n if (spot.startsWith('career')) {\n multiplier = 1;\n } else if (spot.startsWith('double')) {\n multiplier = 2;\n } else if (spot.startsWith('triple')) {\n multiplier = 3;\n } else if (spot === 'quad') {\n multiplier = 4;\n } else if (spot === 'xfive') {\n multiplier = 5;\n }\n\n let totalGoals = selectedPlayer.goals * multiplier;\n\n playerSpots[spot] = selectedPlayer;\n document.getElementById(`${spot}`).innerHTML =\n document.getElementById(`${spot}`).innerHTML.split(':')[0] + `: ${selectedPlayer.name} (${totalGoals} goals)`;\n document.getElementById('playerInfo').innerHTML = `${selectedPlayer.name} placed in ${spot}`;\n selectedPlayer = null;\n document.getElementById('playButton').disabled = false;\n\n if (Object.keys(playerSpots).every(key => playerSpots[key])) {\n calculateScore();\n document.getElementById('playAgainButton').style.display = 'inline-block';\n }\n } else {\n alert(\"Select a player first or spot already used!\");\n }\n }\n\n function calculateScore() {\n let totalGoals = 0;\n for (let spot in playerSpots) {\n if (playerSpots[spot]) {\n let goals = playerSpots[spot].goals;\n let multiplier;\n if (spot.startsWith('career')) {\n multiplier = 1;\n } else if (spot.startsWith('double')) {\n multiplier = 2;\n } else if (spot.startsWith('triple')) {\n multiplier = 3;\n } else if (spot === 'quad') {\n multiplier = 4;\n } else if (spot === 'xfive') {\n multiplier = 5;\n }\n\n totalGoals += goals * multiplier;\n }\n }\n\n if (totalGoals >= 5000) {\n document.getElementById('result').innerText = `Success! Total Goals: ${totalGoals}`;\n } else {\n document.getElementById('result').innerText = `Failed. Total Goals: ${totalGoals}`;\n }\n }\n\n function playAgain() {\n gameStarted = false;\n clicks = 10;\n startGame();\n }\n <\/script>\n<\/body>\n<\/html>\n\n\n\n<html lang=\"en\">\n\n <style>\n .wp-block-post-title , .taxonomy-category, .wp-block-template-part , .bc-compliance {\n display: none;\n }\n <\/style>\n\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Goal Challenge 5000 Goal Challenge Play Place Player: Career 1: Career 2: Career 3: Double 1: Double 2: Double 3: Triple 1: Triple 2: Quad: Xfive: Play Again<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"coAuthor":[],"bcPoll":[],"_bcb_meta_operator":"","_bcb_meta_operator_type":"Bookmaker","_bcsb_meta_sport":"","_bcsb_meta_country":"","_bcsb_meta_event":"","_bcsb_meta_stage":"","_bcsb_meta_season":"","_bcsb_meta_tournament":"","_bcsb_meta_team":"","_bcsb_meta_player":"","bcblockssports_data_event_data":"","footnotes":""},"class_list":["post-3204","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/pages\/3204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/comments?post=3204"}],"version-history":[{"count":2,"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/pages\/3204\/revisions"}],"predecessor-version":[{"id":3210,"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/pages\/3204\/revisions\/3210"}],"wp:attachment":[{"href":"https:\/\/athlenergy.com\/wp-json\/wp\/v2\/media?parent=3204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}