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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

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

Answered: 1 week ago