> go-fish.html > > html > > body Go Fish Game 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 24 2222222222222223 33 Go Fish Your Cards: CPU's Cards: Ask for a Rank: Ask CPU Game starting... 25 26 27 28 Restart Game 29 30 31 JS go-fish.js X JS pig-game.js JS go-fish.js > [] ranks <> go-fish.html 1 // Card deck setup 2 const suits = ["Hearts", "Diamonds", "Clubs", "Spades"]; 3 const ranks = 4 "2" 5 "3" 6 7 8 9 "7" 10 "8" 11 "9" 12 13 14 15 16 17 18 ]; "10", "Jack" "Queen" "King", "Ace" 19 let deck = []; 20 let humanHand = []; 21 let cpuHand = []; 24 25 #2 ± 9922222222222222332mm let isHumanTurn = true; // DOM Elements const humanHandEl = document.getElementById("human-hand"); 26 const cpuHandEl = document.getElementById("cpu-hand"); 27 const gameLogEl = document.getElementById("game-log"); 28 const askBtn = document.getElementById("ask-btn"); const rankInput = document.getElementById("card-rank"); 30 31 // Load sounds const drawSound = new Audio("sounds/draw.mp3"); const winSound = new Audio("sounds/win.mp3"); 34 const shuffleSound = new Audio("sounds/shuffle.mp3"); 35 36 37 // Function to create and shuffle the deck function createDeck() { 38 deck = [];
> go-fish.html > > html > > body Go Fish Game 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 24 2222222222222223 33 Go Fish Your Cards: CPU's Cards: Ask for a Rank: Ask CPU Game starting... 25 26 27 28 Restart Game 29 30 31 JS go-fish.js X JS pig-game.js JS go-fish.js > [] ranks <> go-fish.html 1 // Card deck setup 2 const suits = ["Hearts", "Diamonds", "Clubs", "Spades"]; 3 const ranks = 4 "2" 5 "3" 6 7 8 9 "7" 10 "8" 11 "9" 12 13 14 15 16 17 18 ]; "10", "Jack" "Queen" "King", "Ace" 19 let deck = []; 20 let humanHand = []; 21 let cpuHand = []; 24 25 #2 ± 9922222222222222332mm let isHumanTurn = true; // DOM Elements const humanHandEl = document.getElementById("human-hand"); 26 const cpuHandEl = document.getElementById("cpu-hand"); 27 const gameLogEl = document.getElementById("game-log"); 28 const askBtn = document.getElementById("ask-btn"); const rankInput = document.getElementById("card-rank"); 30 31 // Load sounds const drawSound = new Audio("sounds/draw.mp3"); const winSound = new Audio("sounds/win.mp3"); 34 const shuffleSound = new Audio("sounds/shuffle.mp3"); 35 36 37 // Function to create and shuffle the deck function createDeck() { 38 deck = [];
Chapter8: Arrays
Section: Chapter Questions
Problem 7PE
Related questions
Question
I have attached my code, under I want you to show me how to enhance it and make it more cooler and better in graphics with following the instructions.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning