Changes to wordchain4.scroll.pub

root
root
24 days ago
Initial commit
body.html
Changed around line 1
+
+

Word Chain Game

+

Enter a word that starts with the last letter of the previous word:

+
+
Time left: 15 seconds
+
+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://wordchain.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Word Chain Game
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "1eb16d9d-d78b-4cd8-9191-ed5f5669f7e4",
+ "object": "chat.completion",
+ "created": 1735486295,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nwordchain.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://wordchain.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Word Chain Game\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n

Word Chain Game

\n

Enter a word that starts with the last letter of the previous word:

\n \n
Time left: 15 seconds
\n
\n
\n---style.css---\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n text-align: center;\n margin: 0;\n padding: 0;\n background: linear-gradient(135deg, #f5f7fa, #c3cfe2);\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n#game {\n background: white;\n padding: 2rem;\n border-radius: 15px;\n box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);\n max-width: 500px;\n width: 90%;\n}\n\nh1 {\n color: #333;\n margin-bottom: 1.5rem;\n font-size: 2rem;\n}\n\np {\n color: #555;\n margin-bottom: 1.5rem;\n}\n\ninput[type=\"text\"] {\n padding: 0.75rem;\n font-size: 1rem;\n width: 100%;\n border: 2px solid #ddd;\n border-radius: 8px;\n margin-bottom: 1rem;\n transition: border-color 0.3s ease;\n}\n\ninput[type=\"text\"]:focus {\n border-color: #007bff;\n outline: none;\n}\n\n#timer {\n font-size: 1.2rem;\n margin-bottom: 1rem;\n color: #333;\n}\n\n#output {\n margin-top: 1.5rem;\n font-size: 1.1rem;\n color: #333;\n}\n\n#output p {\n margin: 0.5rem 0;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 1.75rem;\n }\n\n #game {\n padding: 1.5rem;\n }\n}\n---script.js---\nconst wordList = [\n \"above\", \"active\", \"afraid\", \"after\", \"ago\", \"Alaska\", \"all\", \"also\", \"always\", \"amazing\",\n // ... (rest of the word list from the original code)\n \"zoo\"\n];\n\nlet lastLetter = '';\nlet usedWords = new Set();\nlet timer;\nlet timeLeft = 15;\n\nfunction startTimer() {\n clearInterval(timer);\n timeLeft = 15;\n document.getElementById('timeLeft').textContent = timeLeft;\n timer = setInterval(() => {\n timeLeft--;\n document.getElementById('timeLeft').textContent = timeLeft;\n if (timeLeft <= 0) {\n clearInterval(timer);\n document.getElementById('output').innerHTML = '

Time is up! You lose!

';\n document.getElementById('inputWord').disabled = true;\n }\n }, 1000);\n}\n\nfunction handleKeyPress(event) {\n if (event.key === 'Enter') {\n playGame();\n }\n}\n\nfunction playGame() {\n const inputWord = document.getElementById('inputWord').value.toLowerCase();\n const outputDiv = document.getElementById('output');\n\n if (inputWord === '') {\n outputDiv.innerHTML = '

Please enter a word.

';\n return;\n }\n\n if (!wordList.includes(inputWord)) {\n outputDiv.innerHTML = `

\"${inputWord}\" is not in the word list. You lose!

`;\n clearInterval(timer);\n document.getElementById('inputWord').disabled = true;\n return;\n }\n\n if (usedWords.has(inputWord)) {\n outputDiv.innerHTML = `

\"${inputWord}\" has already been used. You lose!

`;\n clearInterval(timer);\n document.getElementById('inputWord').disabled = true;\n return;\n }\n\n if (lastLetter !== '' && inputWord[0] !== lastLetter) {\n outputDiv.innerHTML = `

\"${inputWord}\" does not start with \"${lastLetter}\". You lose!

`;\n clearInterval(timer);\n document.getElementById('inputWord').disabled = true;\n return;\n }\n\n usedWords.add(inputWord);\n lastLetter = inputWord[inputWord.length - 1];\n\n outputDiv.innerHTML = `

You entered: ${inputWord}

`;\n\n const computerWord = findComputerWord(lastLetter);\n\n if (computerWord === null) {\n outputDiv.innerHTML += '

Computer cannot find a word. You win!

';\n clearInterval(timer);\n document.getElementById('inputWord').disabled = true;\n return;\n }\n\n usedWords.add(computerWord);\n lastLetter = computerWord[computerWord.length - 1];\n\n outputDiv.innerHTML += `

Computer responds with: ${computerWord}

`;\n\n document.getElementById('inputWord').value = '';\n startTimer();\n}\n\nfunction findComputerWord(startLetter) {\n const availableWords = wordList.filter(word => \n word[0] === startLetter && !usedWords.has(word)\n );\n\n if (availableWords.length === 0) {\n return null;\n }\n\n return availableWords[Math.floor(Math.random() * availableWords.length)];\n}\n\nstartTimer();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 4279,
+ "completion_tokens": 1303,
+ "total_tokens": 5582,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 4279
+ },
+ "system_fingerprint": "fp_f1afce2943"
+ }
readme.scroll
Changed around line 1
+ # wordchain4.scroll.pub
+ Website generated by DeepSeek from prompt: Word Chain Game

Word Chain Game

Enter a word that starts with the last letter of the previous word:

Time left: 15 seconds
script.js
Changed around line 1
+ const wordList = [
+ "above", "active", "afraid", "after", "ago", "Alaska", "all", "also", "always", "amazing",
+ // ... (rest of the word list from the original code)
+ "zoo"
+ ];
+
+ let lastLetter = '';
+ let usedWords = new Set();
+ let timer;
+ let timeLeft = 15;
+
+ function startTimer() {
+ clearInterval(timer);
+ timeLeft = 15;
+ document.getElementById('timeLeft').textContent = timeLeft;
+ timer = setInterval(() => {
+ timeLeft--;
+ document.getElementById('timeLeft').textContent = timeLeft;
+ if (timeLeft <= 0) {
+ clearInterval(timer);
+ document.getElementById('output').innerHTML = '

Time is up! You lose!

';
+ document.getElementById('inputWord').disabled = true;
+ }
+ }, 1000);
+ }
+
+ function handleKeyPress(event) {
+ if (event.key === 'Enter') {
+ playGame();
+ }
+ }
+
+ function playGame() {
+ const inputWord = document.getElementById('inputWord').value.toLowerCase();
+ const outputDiv = document.getElementById('output');
+
+ if (inputWord === '') {
+ outputDiv.innerHTML = '

Please enter a word.

';
+ return;
+ }
+
+ if (!wordList.includes(inputWord)) {
+ outputDiv.innerHTML = `

"${inputWord}" is not in the word list. You lose!

`;
+ clearInterval(timer);
+ document.getElementById('inputWord').disabled = true;
+ return;
+ }
+
+ if (usedWords.has(inputWord)) {
+ outputDiv.innerHTML = `

"${inputWord}" has already been used. You lose!

`;
+ clearInterval(timer);
+ document.getElementById('inputWord').disabled = true;
+ return;
+ }
+
+ if (lastLetter !== '' && inputWord[0] !== lastLetter) {
+ outputDiv.innerHTML = `

"${inputWord}" does not start with "${lastLetter}". You lose!

`;
+ clearInterval(timer);
+ document.getElementById('inputWord').disabled = true;
+ return;
+ }
+
+ usedWords.add(inputWord);
+ lastLetter = inputWord[inputWord.length - 1];
+
+ outputDiv.innerHTML = `

You entered: ${inputWord}

`;
+
+ const computerWord = findComputerWord(lastLetter);
+
+ if (computerWord === null) {
+ outputDiv.innerHTML += '

Computer cannot find a word. You win!

';
+ clearInterval(timer);
+ document.getElementById('inputWord').disabled = true;
+ return;
+ }
+
+ usedWords.add(computerWord);
+ lastLetter = computerWord[computerWord.length - 1];
+
+ outputDiv.innerHTML += `

Computer responds with: ${computerWord}

`;
+
+ document.getElementById('inputWord').value = '';
+ startTimer();
+ }
+
+ function findComputerWord(startLetter) {
+ const availableWords = wordList.filter(word =>
+ word[0] === startLetter && !usedWords.has(word)
+ );
+
+ if (availableWords.length === 0) {
+ return null;
+ }
+
+ return availableWords[Math.floor(Math.random() * availableWords.length)];
+ }
+
+ startTimer();
style.css
Changed around line 1
+ body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ text-align: center;
+ margin: 0;
+ padding: 0;
+ background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
+ min-height: 100vh;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ #game {
+ background: white;
+ padding: 2rem;
+ border-radius: 15px;
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
+ max-width: 500px;
+ width: 90%;
+ }
+
+ h1 {
+ color: #333;
+ margin-bottom: 1.5rem;
+ font-size: 2rem;
+ }
+
+ p {
+ color: #555;
+ margin-bottom: 1.5rem;
+ }
+
+ input[type="text"] {
+ padding: 0.75rem;
+ font-size: 1rem;
+ width: 100%;
+ border: 2px solid #ddd;
+ border-radius: 8px;
+ margin-bottom: 1rem;
+ transition: border-color 0.3s ease;
+ }
+
+ input[type="text"]:focus {
+ border-color: #007bff;
+ outline: none;
+ }
+
+ #timer {
+ font-size: 1.2rem;
+ margin-bottom: 1rem;
+ color: #333;
+ }
+
+ #output {
+ margin-top: 1.5rem;
+ font-size: 1.1rem;
+ color: #333;
+ }
+
+ #output p {
+ margin: 0.5rem 0;
+ }
+
+ @media (max-width: 600px) {
+ h1 {
+ font-size: 1.75rem;
+ }
+
+ #game {
+ padding: 1.5rem;
+ }
+ }