Question: How to make a continuous rock-scissor-paper game using Verilog? I have to make a continuous rock-scissor-paper game using Verilog. Input : clk,reset, my_card(2-bit; rock=2'b00, scissor
How to make a continuous rock-scissor-paper game using Verilog?
I have to make a continuous rock-scissor-paper game using Verilog.
Input : clk,reset, my_card(2-bit; rock=2'b00, scissor = 2'b01, paper = 2'b10, no_input = 2'b11)
output : penalty(1-bit ; 0 or 1) , reward(1-bit ; 0 or 1) , trial_count(4'bit ; trial_1 = 4'b0000, ... trial_15 = 4'b1110)
I can draw a card ( rock or scissor or paper) and opponent's decision is fixed (first : rock , second : scissor, third : rock, fourth : paper, fifth : rock).
If i win, try next level.
or if i lose or draw , then retry current level
and I will try continuously until beat opponent (maximum 15 trial)
If i beat opponent in 15 trial, i will get reward
If i didn't beat opponent in 15 trial, then i will get penalty
If i beat opponent at 15th trial, also i will get penalty
and make testbench of these cases
1) Finally won at 10th trial
2) all of cards (rock or paper or scissors) were used and draw or lose at least once, and finally won
3) I failed to win this game in 15 trials so get penalty
4) I won this game at 15th trial and i get penalty
sorry for my bad english
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
