Spaces:
Running
Running
could you use the image i sent as the gorilla instead
Browse files149 unmodified lines15015115215315415315515615715836 unmodified lines195196197196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242198199200201202203204205149 unmodified lines // Game variables const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); const gorillaImg = new Image(); gorillaImg.src = 'https://huggingface.co/spaces/BabloOG/gorilla-traffic-dodger/resolve/main/images/linnea-removebg-preview.png'; const startScreen = document.querySelector('.start-screen');const startScreen = document.querySelector('.start-screen'); const gameOverScreen = document.querySelector('.game-over'); const scoreDisplay = document.getElementById('score'); const finalScoreDisplay = document.getElementById('finalScore');36 unmodified lines moveLeft: false, moveRight: false, draw() { // Head ctx.fillStyle = '#333'; ctx.beginPath(); ctx.arc(this.x + this.width / 2, this.y + 20, 20, 0, Math.PI * 2); ctx.fill(); // Eyes ctx.fillStyle = '#fff'; ctx.beginPath(); ctx.arc(this.x + this.width / 2 - 10, this.y + 15, 5, 0, Math.PI * 2); ctx.arc(this.x + this.width / 2 + 10, this.y + 15, 5, 0, Math.PI * 2); ctx.fill(); // Mouth ctx.strokeStyle = '#fff'; ctx.lineWidth = 3; ctx.beginPath(); ctx.arc(this.x + this.width / 2, this.y + 25, 8, 0, Math.PI); ctx.stroke(); // Body ctx.fillStyle = '#000'; ctx.beginPath(); ctx.roundRect(this.x, this.y + 30, this.width, this.height - 30, 10); ctx.fill(); // Arms ctx.fillStyle = '#000'; ctx.beginPath(); ctx.roundRect(this.x - 15, this.y + 40, 20, 40, 10); ctx.roundRect(this.x + this.width - 5, this.y + 40, 20, 40, 10); ctx.fill(); // Legs ctx.fillStyle = '#000'; ctx.beginPath(); ctx.roundRect(this.x, this.y + this.height - 20, 20, 30, 5); ctx.roundRect(this.x + this.width - 20, this.y + this.height - 20, 20, 30, 5); ctx.fill(); // Text on back ctx.fillStyle = '#e94560'; ctx.font = '8px "Press Start 2P"'; ctx.textAlign = 'center'; ctx.fillText('En oberoende', this.x + this.width / 2, this.y + 50); ctx.fillText('möjliggörare', this.x + this.width / 2, this.y + 65); }, // Create gorilla image const gorillaImg = new Image(); gorillaImg.src = 'https://huggingface.co/spaces/BabloOG/gorilla-traffic-dodger/resolve/main/images/linnea-removebg-preview.png'; ctx.drawImage(gorillaImg, this.x, this.y, this.width, this.height);},update() { if (this.moveLeft && this.x > 0) { this.x -= this.speed;index.html+8-48