gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
Make a format-like HTML JS game now it is Code Me. It just has to press around the…
- User
Make a format-like HTML JS game now it is Code Me. It just has to press around the buttons saying "Code me" and they will spawn. HTMl needs to be made with JS in it and CSS
- Assistant
Sure! Here's an example of an HTML/JS format-like game where you can press buttons to spawn more buttons saying "Code me". The CSS styling is included inline for simplicity:
<!DOCTYPE html> <html> <head> <title>Code Me Game</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; font-family: Arial, sans-serif; } #container { display: flex; flex-direction: column; align-items: center; } .spawn-button { margin: 5px; padding: 10px 20px; background-color: #007bff; color: #fff; border: none; border-radius: 5px; cursor: pointer; } .spawned-button { margin: 5px; padding: 10px 20px; background-color: #28a745; color: #fff; border: none; border-radius: 5px; cursor: pointer; transition: transform 0.2s; } .spawned-button:hover { transform: scale(1.1); } </style> </head> <body> <div id="container"> <button class="spawn-button" onclick="spawnButton()">Code me</button> </div> <script> function spawnButton() { var container = document.getElementById('container'); var button = document.createElement('button'); button.className = 'spawned-button'; button.innerHTML = 'Code me'; button.onclick = function() { this.style.backgroundColor = getRandomColor(); }; container.appendChild(button); } function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return color; } </script> </body> </html>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.