Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Compute this in Verilog Code General Description: The common project is a game o

ID: 3779522 • Letter: C

Question



Compute this in Verilog Code General Description: The common project is a game of "guess the 4 Hex digit number". The player pushes the center button to start the game. Your code will generate a Pseudo random number and then scroll it across the screen very fast so the user can't really see it for more than 1/10 of a second and it should move across the eight 7-Seg displays in the 1/10 second. Then the user gets 4 tries to guess the first digit. The guess is entered by raising one of the slide switches representing the number of the guess which is based on the position of the slide switch: Thus, SWI0] would be a guess of "0" and SWU7]would be a guess of "7" and SW[13] would be a guess of "D". Once the slide switch is raised, the guess is entered by pressing the bottom button. If the player gets the first digit then each successive digit is guessed the same way. After the guess, the board responds by flashing LED[0] if the guess is lower than the actual number and LED[15] if the guess is higher and flashing all the LED's if the guess is correct. The digit used as the guess is put in 7- Seg digit #7. Then the player gets 3 more guesses each of which ifwrong is also displayed in order from the Left side in 7-Seg digits #6,5,4 in order. If none of the guesses is correct, then the lower 4, 7-Seg digits show the actual target and the upper 4 guesses stay for 3 seconds and then change to display "F000". Pressing

Explanation / Answer

//code in java import java.util.Arrays; import java.util.Random; import java.util.Scanner; public class Game { public static void main(String[] args) { System.out.println("The computer has generate a unique 4 digit number. " + "You can try to guess the 4 digits number in 5 attempts. "); System.out.println("_______________________________________________________ "); int[] random=numberGenerator(); int maxTry=5; int indexMatch=0; int match=0; while(maxTry>0 && indexMatch!=4){ int[] guess=getGuess(); indexMatch=0; match=0; for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote