commit f27a286086c3e4a7224d413fc3b7670ec6f9c4eb
Author: root <root@hub.scroll.pub>
Date: 2024-12-29 14:50:14 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..aa3d23e
--- /dev/null
+++ b/body.html
@@ -0,0 +1,20 @@
+<header>
+ <h1>Word Chain Game</h1>
+ <p>Challenge the computer in a battle of words!</p>
+</header>
+<main>
+ <div id="game-container">
+ <div id="instructions">
+ <p>Enter a word that starts with the last letter of the previous word.</p>
+ </div>
+ <div id="game-area">
+ <div id="word-display"></div>
+ <input type="text" id="word-input" placeholder="Type your word here..." aria-label="Enter your word">
+ <button id="submit-word">Submit</button>
+ </div>
+ <div id="result"></div>
+ </div>
+</main>
+<footer>
+ <p>Enjoy the game and expand your vocabulary!</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..19b3993
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://wordchain.scroll.pub
+metaTags
+editButton /edit.html
+title Word Chain Game
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..a6c6981
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "0efa7a73-5050-49cd-8b23-549f9ab06efa",
+ "object": "chat.completion",
+ "created": 1735483755,
+ "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<header>\n <h1>Word Chain Game</h1>\n <p>Challenge the computer in a battle of words!</p>\n</header>\n<main>\n <div id=\"game-container\">\n <div id=\"instructions\">\n <p>Enter a word that starts with the last letter of the previous word.</p>\n </div>\n <div id=\"game-area\">\n <div id=\"word-display\"></div>\n <input type=\"text\" id=\"word-input\" placeholder=\"Type your word here...\" aria-label=\"Enter your word\">\n <button id=\"submit-word\">Submit</button>\n </div>\n <div id=\"result\"></div>\n </div>\n</main>\n<footer>\n <p>Enjoy the game and expand your vocabulary!</p>\n</footer>\n---style.css---\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n background-color: #f4f4f9;\n color: #333;\n margin: 0;\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n}\n\nheader {\n text-align: center;\n margin-bottom: 20px;\n}\n\nh1 {\n color: #5c6bc0;\n}\n\n#game-container {\n background: white;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n width: 90%;\n max-width: 400px;\n}\n\n#instructions {\n margin-bottom: 20px;\n}\n\n#game-area {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n#word-display {\n font-size: 1.2em;\n text-align: center;\n padding: 10px;\n background-color: #e8eaf6;\n border-radius: 4px;\n}\n\n#word-input {\n padding: 10px;\n border: 2px solid #5c6bc0;\n border-radius: 4px;\n font-size: 1em;\n}\n\n#submit-word {\n background-color: #5c6bc0;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 1em;\n}\n\n#submit-word:hover {\n background-color: #3949ab;\n}\n\n#result {\n margin-top: 20px;\n text-align: center;\n font-size: 1.1em;\n}\n\nfooter {\n margin-top: 20px;\n text-align: center;\n font-size: 0.9em;\n color: #666;\n}\n---script.js---\nconst wordList = [\"above\", \"active\", \"afraid\", \"after\", \"ago\", \"Alaska\", \"all\", \"also\", \"always\", \"amazing\", \"American\", \"and\", \"angry\", \"animal\", \"ant\", \"any\", \"anything\", \"apple\", \"April\", \"aren't\", \"are not\", \"arm\", \"art\", \"room\", \"ask\", \"at\", \"ate\", \"attention\", \"August\", \"aunt\", \"autumn\", \"baby\", \"bad\", \"badminton\", \"bag\", \"ball\", \"bamboo\", \"banana\", \"basket\", \"basketball\", \"bathroom\", \"be careful\", \"beach\", \"bear\", \"beautiful\", \"because\", \"become\", \"bed\", \"bedroom\", \"beef\", \"before\", \"behind\", \"beside\", \"best\", \"better\", \"between\", \"big\", \"bigger\", \"bike\", \"bird\", \"black\", \"blackboard\", \"blue\", \"boat\", \"boating\", \"body\", \"book\", \"bookstore\", \"both\", \"bottle\", \"bought\", \"bowl\", \"box\", \"boy\", \"bread\", \"breakfast\", \"breath\", \"bridge\", \"broken\", \"brother\", \"brown\", \"building\", \"bunny\", \"bus\", \"businessman\", \"busy\", \"but\", \"buy\", \"by\", \"cake\", \"camp\", \"Canada\", \"Canadian\", \"Canberra\", \"candy\", \"cap\", \"car\", \"carrot\", \"cartoon\", \"cat\", \"cave\", \"chair\", \"chase\", \"cheap\", \"cheetah\", \"chicken\", \"children\", \"China\", \"Chinese book\", \"chocolate\", \"chopsticks\", \"Christmas\", \"cinema\", \"class\", \"classroom\", \"clean\", \"clean my room\", \"cleaned\", \"clever\", \"climbing\", \"clock\", \"clothes\", \"cloudy\", \"club\", \"coach\", \"coat\", \"cold\", \"come on\", \"comic\", \"comic book\", \"computer\", \"computer room\", \"contest\", \"cook\", \"cooking\", \"cool\", \"could\", \"count\", \"count to ten\", \"country\", \"countryside\", \"cousin\", \"cow\", \"crayon\", \"crossing\", \"cute\", \"cycling\", \"dad\", \"dance\", \"dancing\", \"day\", \"dear\", \"December\", \"deep\", \"degree\", \"delicious\", \"desk\", \"diary\", \"dictionary\", \"different\", \"dining hall\", \"dinner\", \"dinosaur\", \"dirty\", \"do\", \"do homework\", \"do kung fu\", \"do morning exercises\", \"doctor\", \"dog\", \"doing morning exercises\", \"dollar\", \"door\", \"down\", \"drank\", \"draw\", \"draw cartoons\", \"dream\", \"dress\", \"drink\", \"drinking\", \"driver\", \"duck\", \"each\", \"each other\", \"ear\", \"early\", \"Easter\", \"easy\", \"eat\", \"eat breakfast\", \"eat dinner\", \"eating\", \"eating lunch\", \"egg\", \"eight\", \"eighteen\", \"eighty\", \"elephant\", \"eleven\", \"else\", \"email\", \"English book\", \"English class\", \"enjoy\", \"eraser\", \"evening\", \"every\", \"everyone\", \"everywhere\", \"excited\", \"exercise\", \"exhibition\", \"expensive\", \"eye\", \"face\", \"factory\", \"fall\", \"family\", \"fan\", \"far\", \"farm\", \"farmer\", \"fast\", \"faster\", \"fat\", \"father\", \"favourite\", \"feature\", \"February\", \"feel\", \"fell\", \"felt\", \"ferry\", \"few\", \"fifteen\", \"fifth\", \"film\", \"find\", \"finish\", \"first\", \"first floor\", \"fish\", \"fisherman\", \"five\", \"fixed\", \"floor\", \"flower\", \"fly\", \"follow\", \"food\", \"fool\", \"foot\", \"football player\", \"forest\", \"fork\", \"forty\", \"four\", \"fourteen\", \"fourth\", \"fresh\", \"Friday\", \"fridge\", \"friend\", \"friendly\", \"front\", \"fruit\", \"funny\", \"fur\", \"game\", \"garden\", \"gave\", \"Germany\", \"get\", \"get together\", \"get up\", \"gift\", \"giraffe\", \"girl\", \"glasses\", \"glove\", \"go boating\", \"go cycling\", \"go for a walk\", \"go home\", \"go on a picnic\", \"go shopping\", \"go swimming\", \"go to bed\", \"go to school\", \"goal\", \"goat\", \"good job\", \"GPS\", \"grandfather\", \"grandma\", \"grandmother\", \"grandpa\", \"grandparent\", \"grape\", \"grass\", \"green\", \"green beans\", \"gym\", \"had\", \"had a cold\", \"hair\", \"half\", \"hall\", \"hamburger\", \"hand\", \"happy\", \"hard-working\", \"hat\", \"have a look\", \"have class\", \"having ... class\", \"he\", \"head\", \"head teacher\", \"healthy\", \"hear\", \"heavier\", \"helmet\", \"help\", \"help yourself\", \"helpful\", \"hen\", \"her\", \"hers\", \"high\", \"hiking\", \"him\", \"his\", \"hobby\", \"holiday\", \"homework\", \"horse\", \"hospital\", \"hot\", \"hotel\", \"house\", \"how about\", \"how much\", \"hurry up\", \"hurt\", \"ice cream\", \"ice-skate\", \"idea\", \"if\", \"ill\", \"in\", \"in front of\", \"interesting\", \"internet\", \"island\", \"Italian\", \"its\", \"jacket\", \"January\", \"jasmine\", \"job\", \"join\", \"juice\", \"July\", \"jumping\", \"June\", \"just\", \"just a minute\", \"keep\", \"keep to the right\", \"keep your desk clean\", \"key\", \"kid\", \"kilogram\", \"kind\", \"kitchen\", \"kite\", \"kitten\", \"knife\", \"know\", \"kung fu\", \"Labour Day\", \"lake\", \"lamp\", \"last\", \"late\", \"laughed\", \"leaf\", \"learn\", \"left\", \"leg\", \"lesson\", \"letter\", \"library\", \"licked\", \"light\", \"like\", \"listening to music\", \"little\", \"live\", \"living room\", \"London\", \"long\", \"longer\", \"look for\", \"look up\", \"lost\", \"lot\", \"lots of\", \"loud\", \"love\", \"lovely\", \"lower\", \"lunch\", \"magazine\", \"make a snowman\", \"man\", \"map\", \"March\", \"maths book\", \"May\", \"meet\", \"metre\", \"mice\", \"Mid-Autumn Festival\", \"milk\", \"mine\", \"Monday\", \"monkey\", \"moon\", \"mooncake\", \"more\", \"Moscow\", \"mother\", \"mountain\", \"mouse\", \"mouth\", \"move\", \"Mrs\", \"Ms\", \"mud\", \"mule\", \"mum\", \"Munich\", \"museum\", \"music class\", \"music room\", \"must\", \"national\", \"National Day\", \"nature\", \"near\", \"need\", \"new\", \"New York\", \"next\", \"next to\", \"next week\", \"nice\", \"nine\", \"nineteen\", \"no\", \"no problem\", \"noise\", \"noodles\", \"nose\", \"notebook\", \"nothing\", \"November\", \"now\", \"nurse\", \"o'clock\", \"October\", \"of course\", \"off\", \"often\", \"OK\", \"old\", \"older\", \"on\", \"on foot\", \"one\", \"onion\", \"open\", \"or\", \"orange\", \"other\", \"our\", \"ours\", \"outside\", \"over\", \"p.m.\", \"pack\", \"paint\", \"panda\", \"pants\", \"Papa Westray\", \"parents\", \"park\", \"part\", \"party\", \"pass\", \"pay attention to\", \"PE class\", \"pear\", \"pen\", \"pen pal\", \"pencil\", \"pencil box\", \"people\", \"phone\", \"photo\", \"pick\", \"pick apples\", \"picnic\", \"picture\", \"pig\", \"pilot\", \"ping-pong\", \"pink\", \"pizza\", \"plane\", \"plant\", \"plate\", \"play\", \"play basketball\", \"play football\", \"play ping-pong\", \"play sports\", \"play the pipa\", \"playground\", \"playing\", \"poem\", \"police officer\", \"polite\", \"post office\", \"postcard\", \"postman\", \"potato\", \"pretty\", \"price\", \"problem\", \"pull\", \"pupil\", \"puppy\", \"puzzle\", \"quickly\", \"quiet\", \"rabbit\", \"race\", \"rainy\", \"read\", \"read books\", \"reading a book\", \"ready\", \"really\", \"red\", \"reporter\", \"restaurant\", \"rice\", \"right\", \"river\", \"robot\", \"rode\", \"roll\", \"RSVP\", \"ruler\", \"sad\", \"salad\", \"sale\", \"sandwich\", \"Saturday\", \"saw\", \"say\", \"scarf\", \"schedule\", \"school\", \"schoolbag\", \"science\", \"scientist\", \"Scotland\", \"sea\", \"season\", \"second\", \"second floor\", \"secretary\", \"see a doctor\", \"see a film\", \"send\", \"September\", \"seven\", \"seventeen\", \"shadow\", \"shall\", \"share\", \"she\", \"sheep\", \"ship\", \"shirt\", \"shoe\", \"shop\", \"short\", \"shorter\", \"shorts\", \"should\", \"show\", \"shy\", \"sing\", \"sing English songs\", \"Singapore\", \"sir\", \"sister\", \"sit\", \"six\", \"sixteen\", \"size\", \"skirt\", \"sled\", \"sleeping\", \"slept\", \"slow\", \"slow down\", \"small\", \"smaller\", \"smarter\", \"snow\", \"snowman\", \"snowy\", \"so\", \"so much\", \"sock\", \"sofa\", \"sometimes\", \"song\", \"sound\", \"soup\", \"space\", \"Spain\", \"Spanish\", \"speak\", \"speak English\", \"special\", \"spoon\", \"sport\", \"sports meet\", \"spring\", \"star\", \"start\", \"stay\", \"stayed\", \"still\", \"stop\", \"storybook\", \"straight\", \"strawberry\", \"street\", \"strict\", \"strong\", \"stronger\", \"stuck\", \"student\", \"studies\", \"study\", \"subway\", \"summer\", \"Sunday\", \"sunglasses\", \"sunny\", \"supermarket\", \"sure\", \"sushi\", \"sweater\", \"sweet\", \"swim\", \"Sydney\", \"table\", \"tail\", \"take\", \"take a dancing class\", \"take a deep breath\", \"take a trip\", \"take turns\", \"talk quietly\", \"tall\", \"taller\", \"taxi\", \"tea\", \"teach\", \"teacher\", \"teacher's desk\", \"teachers' office\", \"tell\", \"ten\", \"than\", \"Thanksgiving\", \"The Great Wall\", \"their\", \"theirs\", \"them\", \"there\", \"these\", \"thin\", \"thing\", \"thinner\", \"third\", \"thirsty\", \"thirteen\", \"thirtieth\", \"thirty\", \"those\", \"thought\", \"three\", \"Thursday\", \"tiger\", \"till\", \"tired\", \"today\", \"together\", \"tomato\", \"tomorrow\", \"tonight\", \"too\", \"took\", \"took pictures\", \"toy\", \"traffic\", \"traffic lights\", \"train\", \"travel\", \"tree\", \"trip\", \"try\", \"try on\", \"Tuesday\", \"turn\", \"Turpan\", \"TV\", \"twelfth\", \"twelve\", \"twentieth\", \"twenty\", \"twenty-first\", \"twenty-third\", \"two\", \"type\", \"UK\", \"umbrella\", \"uncle\", \"under\", \"university\", \"us\", \"USA\", \"use\", \"usually\", \"vacation\", \"vegetable\", \"village\", \"visit\", \"wait\", \"walk\", \"wall\", \"want\", \"warm\", \"wash\", \"wash my clothes\", \"washed\", \"watch\", \"watch TV\", \"watched\", \"water\", \"water bottle\", \"watermelon\", \"way\", \"wear\", \"weather\", \"Wednesday\", \"weekend\", \"well\", \"we'll = we will\", \"went\", \"went camping\", \"went fishing\", \"when\", \"which\", \"white\", \"whose\", \"why\", \"will\", \"win\", \"window\", \"windy\", \"winter\", \"woke\", \"woman\", \"wonderful\", \"word\", \"word book\", \"work\", \"worker\", \"world\", \"worried\", \"worry\", \"wow\", \"wrong\", \"year\", \"yellow\", \"yesterday\", \"young\", \"younger\", \"your\", \"yours\", \"yum\", \"zoo\"];\n\nlet lastWord = '';\nlet isPlayerTurn = true;\n\ndocument.getElementById('submit-word').addEventListener('click', function() {\n const userWord = document.getElementById('word-input').value.toLowerCase();\n if (isValidWord(userWord)) {\n lastWord = userWord;\n document.getElementById('word-display').textContent = `Last word: ${lastWord}`;\n document.getElementById('result').textContent = '';\n isPlayerTurn = false;\n setTimeout(computerTurn, 1000);\n } else {\n document.getElementById('result').textContent = 'Invalid word or not in the list!';\n }\n document.getElementById('word-input').value = '';\n});\n\nfunction isValidWord(word) {\n if (!wordList.includes(word)) return false;\n if (lastWord && word[0] !== lastWord[lastWord.length - 1]) return false;\n return true;\n}\n\nfunction computerTurn() {\n const possibleWords = wordList.filter(word => word[0] === lastWord[lastWord.length - 1]);\n if (possibleWords.length > 0) {\n const computerWord = possibleWords[Math.floor(Math.random() * possibleWords.length)];\n lastWord = computerWord;\n document.getElementById('word-display').textContent = `Last word: ${lastWord}`;\n isPlayerTurn = true;\n } else {\n document.getElementById('result').textContent = 'Computer cannot find a word. You win!';\n }\n}\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 1313,
+ "completion_tokens": 3926,
+ "total_tokens": 5239,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 1313
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..c6c9697
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# wordchain2.scroll.pub
+Website generated by DeepSeek from prompt: 制作一个简单的“Word Chain”游戏,玩家将与电脑对战。游戏的基本逻辑将如下: 玩家输入一个单词。 电脑从列表中选择一个以该单词最后一个字母开头的单词。 游戏交替进行,直到电脑或玩家无法继续或输入了不在列表中的单词。 单词列表是: above active afraid after ago Alaska all also always amazing American and angry animal ant any anything apple April aren't = are not arm art room ask at ate attention August aunt autumn baby bad badminton bag ball bamboo banana basket basketball bathroom be careful beach bear beautiful because become bed bedroom beef before behind beside best better between big bigger bike bird black blackboard blue boat boating body book bookstore both bottle bought bowl box boy bread breakfast breath bridge broken brother brown building bunny bus businessman busy but buy by cake camp Canada Canadian Canberra candy cap car carrot cartoon cat cave chair chase cheap cheetah chicken children China Chinese book chocolate chopsticks Christmas cinema class classroom clean clean my room cleaned clever climbing clock clothes cloudy club coach coat cold come on comic comic book computer computer room contest cook cooking cool could count count to ten country countryside cousin cow crayon crossing cute cycling dad dance dancing day dear December deep degree delicious desk diary dictionary different dining hall dinner dinosaur dirty do do homework do kung fu do morning exercises doctor dog doing morning exercises dollar door down drank draw draw cartoons dream dress drink drinking driver duck each each other ear early Easter easy eat eat breakfast eat dinner eating eating lunch egg eight eighteen eighty elephant eleven else email English book English class enjoy eraser evening every everyone everywhere excited exercise exhibition expensive eye face factory fall family fan far farm farmer fast faster fat father favourite feature February feel fell felt ferry few fifteen fifth film find finish first first floor fish fisherman five fixed floor flower fly follow food fool foot football player forest fork forty four fourteen fourth fresh Friday fridge friend friendly front fruit funny fur game garden gave Germany get get together get up gift giraffe girl glasses glove go boating go cycling go for a walk go home go on a picnic go shopping go swimming go to bed go to school goal goat good job GPS grandfather grandma grandmother grandpa grandparent grape grass green green beans gym had had a cold hair half hall hamburger hand happy hard-working hat have a look have class having ... class he head head teacher healthy hear heavier helmet help help yourself helpful hen her hers high hiking him his hobby holiday homework horse hospital hot hotel house how about how much hurry up hurt ice cream ice-skate idea if ill in in front of interesting internet island Italian its jacket January jasmine job join juice July jumping June just just a minute keep keep to the right keep your desk clean key kid kilogram kind kitchen kite kitten knife know kung fu Labour Day lake lamp last late laughed leaf learn left leg lesson letter library licked light like listening to music little live living room London long longer look for look up lost lot lots of loud love lovely lower lunch magazine make a snowman man map March maths book May meet metre mice Mid-Autumn Festival milk mine Monday monkey moon mooncake more Moscow mother mountain mouse mouth move Mrs Ms mud mule mum Munich museum music class music room must national National Day nature near need new New York next next to next week nice nine nineteen no no problem noise noodles nose notebook nothing November now nurse o'clock October of course off often OK old older on on foot one onion open or orange other our ours outside over p.m. pack paint panda pants Papa Westray parents park part party pass pay attention to PE class pear pen pen pal pencil pencil box people phone photo pick pick apples picnic picture pig pilot ping-pong pink pizza plane plant plate play play basketball play football play ping-pong play sports play the pipa playground playing poem police officer polite post office postcard postman potato pretty price problem pull pupil puppy puzzle quickly quiet rabbit race rainy read read books reading a book ready really red reporter restaurant rice right river robot rode roll RSVP ruler sad salad sale sandwich Saturday saw say scarf schedule school schoolbag science scientist Scotland sea season second second floor secretary see a doctor see a film send September seven seventeen shadow shall share she sheep ship shirt shoe shop short shorter shorts should show shy sing sing English songs Singapore sir sister sit six sixteen size skirt sled sleeping slept slow slow down small smaller smarter snow snowman snowy so so much sock sofa sometimes song sound soup space Spain Spanish speak speak English special spoon sport sports meet spring star start stay stayed still stop storybook straight strawberry street strict strong stronger stuck student studies study subway summer Sunday sunglasses sunny supermarket sure sushi sweater sweet swim Sydney table tail take take a dancing class take a deep breath take a trip take turns talk quietly tall taller taxi tea teach teacher teacher's desk teachers' office tell ten than Thanksgiving The Great Wall their theirs them there these thin thing thinner third thirsty thirteen thirtieth thirty those thought three Thursday tiger till tired today together tomato tomorrow tonight too took took pictures toy traffic traffic lights train travel tree trip try try on Tuesday turn Turpan TV twelfth twelve twentieth twenty twenty-first twenty-third two type UK umbrella uncle under university us USA use usually vacation vegetable village visit wait walk wall want warm wash wash my clothes washed watch watch TV watched water water bottle watermelon way wear weather Wednesday weekend well we'll = we will went went camping went fishing when which white whose why will win window windy winter woke woman wonderful word word book work worker world worried worry wow wrong year yellow yesterday young younger your yours yum zoo
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..5b07dc2
--- /dev/null
+++ b/script.js
@@ -0,0 +1,36 @@
+const wordList = ["above", "active", "afraid", "after", "ago", "Alaska", "all", "also", "always", "amazing", "American", "and", "angry", "animal", "ant", "any", "anything", "apple", "April", "aren't", "are not", "arm", "art", "room", "ask", "at", "ate", "attention", "August", "aunt", "autumn", "baby", "bad", "badminton", "bag", "ball", "bamboo", "banana", "basket", "basketball", "bathroom", "be careful", "beach", "bear", "beautiful", "because", "become", "bed", "bedroom", "beef", "before", "behind", "beside", "best", "better", "between", "big", "bigger", "bike", "bird", "black", "blackboard", "blue", "boat", "boating", "body", "book", "bookstore", "both", "bottle", "bought", "bowl", "box", "boy", "bread", "breakfast", "breath", "bridge", "broken", "brother", "brown", "building", "bunny", "bus", "businessman", "busy", "but", "buy", "by", "cake", "camp", "Canada", "Canadian", "Canberra", "candy", "cap", "car", "carrot", "cartoon", "cat", "cave", "chair", "chase", "cheap", "cheetah", "chicken", "children", "China", "Chinese book", "chocolate", "chopsticks", "Christmas", "cinema", "class", "classroom", "clean", "clean my room", "cleaned", "clever", "climbing", "clock", "clothes", "cloudy", "club", "coach", "coat", "cold", "come on", "comic", "comic book", "computer", "computer room", "contest", "cook", "cooking", "cool", "could", "count", "count to ten", "country", "countryside", "cousin", "cow", "crayon", "crossing", "cute", "cycling", "dad", "dance", "dancing", "day", "dear", "December", "deep", "degree", "delicious", "desk", "diary", "dictionary", "different", "dining hall", "dinner", "dinosaur", "dirty", "do", "do homework", "do kung fu", "do morning exercises", "doctor", "dog", "doing morning exercises", "dollar", "door", "down", "drank", "draw", "draw cartoons", "dream", "dress", "drink", "drinking", "driver", "duck", "each", "each other", "ear", "early", "Easter", "easy", "eat", "eat breakfast", "eat dinner", "eating", "eating lunch", "egg", "eight", "eighteen", "eighty", "elephant", "eleven", "else", "email", "English book", "English class", "enjoy", "eraser", "evening", "every", "everyone", "everywhere", "excited", "exercise", "exhibition", "expensive", "eye", "face", "factory", "fall", "family", "fan", "far", "farm", "farmer", "fast", "faster", "fat", "father", "favourite", "feature", "February", "feel", "fell", "felt", "ferry", "few", "fifteen", "fifth", "film", "find", "finish", "first", "first floor", "fish", "fisherman", "five", "fixed", "floor", "flower", "fly", "follow", "food", "fool", "foot", "football player", "forest", "fork", "forty", "four", "fourteen", "fourth", "fresh", "Friday", "fridge", "friend", "friendly", "front", "fruit", "funny", "fur", "game", "garden", "gave", "Germany", "get", "get together", "get up", "gift", "giraffe", "girl", "glasses", "glove", "go boating", "go cycling", "go for a walk", "go home", "go on a picnic", "go shopping", "go swimming", "go to bed", "go to school", "goal", "goat", "good job", "GPS", "grandfather", "grandma", "grandmother", "grandpa", "grandparent", "grape", "grass", "green", "green beans", "gym", "had", "had a cold", "hair", "half", "hall", "hamburger", "hand", "happy", "hard-working", "hat", "have a look", "have class", "having ... class", "he", "head", "head teacher", "healthy", "hear", "heavier", "helmet", "help", "help yourself", "helpful", "hen", "her", "hers", "high", "hiking", "him", "his", "hobby", "holiday", "homework", "horse", "hospital", "hot", "hotel", "house", "how about", "how much", "hurry up", "hurt", "ice cream", "ice-skate", "idea", "if", "ill", "in", "in front of", "interesting", "internet", "island", "Italian", "its", "jacket", "January", "jasmine", "job", "join", "juice", "July", "jumping", "June", "just", "just a minute", "keep", "keep to the right", "keep your desk clean", "key", "kid", "kilogram", "kind", "kitchen", "kite", "kitten", "knife", "know", "kung fu", "Labour Day", "lake", "lamp", "last", "late", "laughed", "leaf", "learn", "left", "leg", "lesson", "letter", "library", "licked", "light", "like", "listening to music", "little", "live", "living room", "London", "long", "longer", "look for", "look up", "lost", "lot", "lots of", "loud", "love", "lovely", "lower", "lunch", "magazine", "make a snowman", "man", "map", "March", "maths book", "May", "meet", "metre", "mice", "Mid-Autumn Festival", "milk", "mine", "Monday", "monkey", "moon", "mooncake", "more", "Moscow", "mother", "mountain", "mouse", "mouth", "move", "Mrs", "Ms", "mud", "mule", "mum", "Munich", "museum", "music class", "music room", "must", "national", "National Day", "nature", "near", "need", "new", "New York", "next", "next to", "next week", "nice", "nine", "nineteen", "no", "no problem", "noise", "noodles", "nose", "notebook", "nothing", "November", "now", "nurse", "o'clock", "October", "of course", "off", "often", "OK", "old", "older", "on", "on foot", "one", "onion", "open", "or", "orange", "other", "our", "ours", "outside", "over", "p.m.", "pack", "paint", "panda", "pants", "Papa Westray", "parents", "park", "part", "party", "pass", "pay attention to", "PE class", "pear", "pen", "pen pal", "pencil", "pencil box", "people", "phone", "photo", "pick", "pick apples", "picnic", "picture", "pig", "pilot", "ping-pong", "pink", "pizza", "plane", "plant", "plate", "play", "play basketball", "play football", "play ping-pong", "play sports", "play the pipa", "playground", "playing", "poem", "police officer", "polite", "post office", "postcard", "postman", "potato", "pretty", "price", "problem", "pull", "pupil", "puppy", "puzzle", "quickly", "quiet", "rabbit", "race", "rainy", "read", "read books", "reading a book", "ready", "really", "red", "reporter", "restaurant", "rice", "right", "river", "robot", "rode", "roll", "RSVP", "ruler", "sad", "salad", "sale", "sandwich", "Saturday", "saw", "say", "scarf", "schedule", "school", "schoolbag", "science", "scientist", "Scotland", "sea", "season", "second", "second floor", "secretary", "see a doctor", "see a film", "send", "September", "seven", "seventeen", "shadow", "shall", "share", "she", "sheep", "ship", "shirt", "shoe", "shop", "short", "shorter", "shorts", "should", "show", "shy", "sing", "sing English songs", "Singapore", "sir", "sister", "sit", "six", "sixteen", "size", "skirt", "sled", "sleeping", "slept", "slow", "slow down", "small", "smaller", "smarter", "snow", "snowman", "snowy", "so", "so much", "sock", "sofa", "sometimes", "song", "sound", "soup", "space", "Spain", "Spanish", "speak", "speak English", "special", "spoon", "sport", "sports meet", "spring", "star", "start", "stay", "stayed", "still", "stop", "storybook", "straight", "strawberry", "street", "strict", "strong", "stronger", "stuck", "student", "studies", "study", "subway", "summer", "Sunday", "sunglasses", "sunny", "supermarket", "sure", "sushi", "sweater", "sweet", "swim", "Sydney", "table", "tail", "take", "take a dancing class", "take a deep breath", "take a trip", "take turns", "talk quietly", "tall", "taller", "taxi", "tea", "teach", "teacher", "teacher's desk", "teachers' office", "tell", "ten", "than", "Thanksgiving", "The Great Wall", "their", "theirs", "them", "there", "these", "thin", "thing", "thinner", "third", "thirsty", "thirteen", "thirtieth", "thirty", "those", "thought", "three", "Thursday", "tiger", "till", "tired", "today", "together", "tomato", "tomorrow", "tonight", "too", "took", "took pictures", "toy", "traffic", "traffic lights", "train", "travel", "tree", "trip", "try", "try on", "Tuesday", "turn", "Turpan", "TV", "twelfth", "twelve", "twentieth", "twenty", "twenty-first", "twenty-third", "two", "type", "UK", "umbrella", "uncle", "under", "university", "us", "USA", "use", "usually", "vacation", "vegetable", "village", "visit", "wait", "walk", "wall", "want", "warm", "wash", "wash my clothes", "washed", "watch", "watch TV", "watched", "water", "water bottle", "watermelon", "way", "wear", "weather", "Wednesday", "weekend", "well", "we'll = we will", "went", "went camping", "went fishing", "when", "which", "white", "whose", "why", "will", "win", "window", "windy", "winter", "woke", "woman", "wonderful", "word", "word book", "work", "worker", "world", "worried", "worry", "wow", "wrong", "year", "yellow", "yesterday", "young", "younger", "your", "yours", "yum", "zoo"];
+
+let lastWord = '';
+let isPlayerTurn = true;
+
+document.getElementById('submit-word').addEventListener('click', function() {
+ const userWord = document.getElementById('word-input').value.toLowerCase();
+ if (isValidWord(userWord)) {
+ lastWord = userWord;
+ document.getElementById('word-display').textContent = `Last word: ${lastWord}`;
+ document.getElementById('result').textContent = '';
+ isPlayerTurn = false;
+ setTimeout(computerTurn, 1000);
+ } else {
+ document.getElementById('result').textContent = 'Invalid word or not in the list!';
+ }
+ document.getElementById('word-input').value = '';
+});
+
+function isValidWord(word) {
+ if (!wordList.includes(word)) return false;
+ if (lastWord && word[0] !== lastWord[lastWord.length - 1]) return false;
+ return true;
+}
+
+function computerTurn() {
+ const possibleWords = wordList.filter(word => word[0] === lastWord[lastWord.length - 1]);
+ if (possibleWords.length > 0) {
+ const computerWord = possibleWords[Math.floor(Math.random() * possibleWords.length)];
+ lastWord = computerWord;
+ document.getElementById('word-display').textContent = `Last word: ${lastWord}`;
+ isPlayerTurn = true;
+ } else {
+ document.getElementById('result').textContent = 'Computer cannot find a word. You win!';
+ }
+}
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..893d67f
--- /dev/null
+++ b/style.css
@@ -0,0 +1,82 @@
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ background-color: #f4f4f9;
+ color: #333;
+ margin: 0;
+ padding: 20px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ min-height: 100vh;
+}
+
+header {
+ text-align: center;
+ margin-bottom: 20px;
+}
+
+h1 {
+ color: #5c6bc0;
+}
+
+#game-container {
+ background: white;
+ padding: 20px;
+ border-radius: 8px;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ width: 90%;
+ max-width: 400px;
+}
+
+#instructions {
+ margin-bottom: 20px;
+}
+
+#game-area {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+#word-display {
+ font-size: 1.2em;
+ text-align: center;
+ padding: 10px;
+ background-color: #e8eaf6;
+ border-radius: 4px;
+}
+
+#word-input {
+ padding: 10px;
+ border: 2px solid #5c6bc0;
+ border-radius: 4px;
+ font-size: 1em;
+}
+
+#submit-word {
+ background-color: #5c6bc0;
+ color: white;
+ border: none;
+ padding: 10px 20px;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 1em;
+}
+
+#submit-word:hover {
+ background-color: #3949ab;
+}
+
+#result {
+ margin-top: 20px;
+ text-align: center;
+ font-size: 1.1em;
+}
+
+footer {
+ margin-top: 20px;
+ text-align: center;
+ font-size: 0.9em;
+ color: #666;
+}
\ No newline at end of file