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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!