Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write mips program for connect 4 using 3 palyer and use 7 x 6 matrix. The board must be shown to the user. How exactly?

write mips program for connect 4 using 3 palyer and use 7x6 matrix. The board must be shown to the user. How exactly? Thats up to you! Check my example below if you are not sure how to proceed!Ending the game
The game should end when one of the players successfully drops 4 tokens in line. At that point, let the user know that the game has ended, and who won.
Example run
This is only an example!!! Feel free to ignore everything except functionality!
Welcome to connect-4 the MIPS version
This is a 2 player game, each player will take turns placing a token.
The objective is to create a line of 4 consecutive tokens.
Good luck!
0123456
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|Select a column to play. Must be between 0 and 6
3
0123456
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|*|_|_|_|
Select a column to play. Must be between 0 and 6
3
0123456
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|+|_|_|_|
|_|_|_|*|_|_|_|Select a column to play. Must be between 0 and 6
1
0123456
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|*|_|_|
|_|_|+|+|+|*|_|
|+|*|+|+|*|*|_|
|*|+|*|*|*|+|_|
Select a column to play. Must be between 0 and 6
1
0123456
|_|_|_|_|_|_|_|
|_|_|_|_|_|_|_|
|_|_|_|_|*|_|_|
|_|+|+|+|+|*|_|
|+|*|+|+|*|*|_|
|*|+|*|*|*|+|_|
Congratulations player 2. You won.
Thanks for playing!
The only requirement here is that Empty tiles must be clearly empty, and players should have different tokens to represent the tokens. I used an _ to represent empty tiles, * to represent Player 1 tokens, and + to represent Player 2 tokens.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago