Question
This is to be done in MIPS assembly code. You will create an array with 52 slots that are large enough to contain an int
This is to be done in MIPS assembly code.
You will create an array with 52 slots that are large enough to contain an int and a char value. The integer values represent 13 face values for a deck of cards. The numbered values (2-10) should correspond to the integer values stored for them. 11-14 represent the Jack, Queen, King and Ace respectively. The char values are the 4 different suits for a deck of cars (h = hearts, d = diamonds, s = spades, c = clubs).
Use the MIPS syscall 41 (or 42) to pick two random slots to swap. Do this 1,000 times to shuffle the deck.
Put the first or last 5 cards from the deck array into a hand array and remove them from the deck array. remove is in quotes because youll probably want to keep track of how many cards are on the deck and simply decrement this with every card draw.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started