Develop a program that plays Connect Four using x86-64 assembly code

Develop a program that plays Connect Four using x86-64 assembly code
COSC 30203 – Computer System Fundamentals
Project 3: Connect Four
Spring 2017
Due: 23:59:59, March XXth, 2017
Objective
The objective of this project is to develop an computer program that plays Connect Four using only
x86-64 assembly code. Note: if you are unfamiliar with the game of Connect Four please search
the internet for the game play details.
The Connect Four Environment
Your version of the Connect Four program will be human versus Computer. The game will use the
standard 6-rows by 7-columns game board. This will necessitate that your game have “some” level
of artificial intelligence built into your program.
Game Play
This section will describe Connect Four game play. This list is a suggestion, and does not replace
your own flowchart, algorithm, or other notes. It is expected that you will be creative and
unique with your program.
A. Display a greeting. E.g. “Welcome to x86-64 Conenct Four!”
B. Name phase: Get the name of the Player. Assume the name will not be longer than 16
characters in length. The Player’s name is terminated by the NULL character. Refer to the
Player by name.
C. Ask the player if they would like to go first or second. Use “X” for the first player and “O”
for the second player.
D. Display the game board. Have a row of column labels (integers) that represent which column
to drop a piece.
E. Prompt the player for the column number.
F. Display the game board. Have the computer select a column, display the column to the user,
drop the piece, and then display the game board again.
1
COSC 30203 (045) Computer System Fundamentals Project 3: Connect Four
Here is a short example of the start of a game. Your board may be look different.
Welcome to Connect Four.
Would you like to go first (X) [Y/n]: Y
****Connect Four****
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
1 2 3 4 5 6 7
Player 1 (X):
Enter number coordinate: 1
****Connect Four****
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| X | | | | | | |
—————————–
1 2 3 4 5 6 7
Player 2 (O):
Enter number coordinate: 2
****Connect Four****
| | | | | | | |
—————————–
| | | | | | | |
Spring 2017 Version: 03022017-001 2
COSC 30203 (045) Computer System Fundamentals Project 3: Connect Four
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| | | | | | | |
—————————–
| X | O | | | | | |
—————————–
1 2 3 4 5 6 7
Player 1 (X):
Enter number coordinate:
. . .
Requirements
1. Have a procedure that displays the instructions.
2. Have a procedure that asks a Yes or No question.
3. Have a procedure that asks for a number (valid column).
4. Have a procedure that determines who goes first: human or computer. Player 1 is “X”.
5. Have a procedure that will create a new empty board.
6. Have a procedure that will display the board to the screen.
7. Have a procedure that will return a list of legal moves.
8. Have a procedure that will determine if there is a winner.
9. Have a procedure that will perform the human move.
10. Have a procedure that will perform a computer move.
11. Have a procedure that will switch turns.
12. Have a procedure that will congratulate the winner.
13. Have a main procedure to drive the game play.
Basic Artificial Intelligence
If the computer can win in the next move, the compute will choose that move. If the computer
determines it cannot win in the next move, but does determine that the other player can win in one
more move, then the computer will block the player. If the computer will not win in the next move,
and the player will not win in the next move, then the computer will choose a random column to
drop the piece.
Spring 2017 Version: 03022017-001 3
COSC 30203 (045) Computer System Fundamentals Project 3: Connect Four
Assessment and Grading
This assignment may be completed by teams of XXX. Teams will be determined in class. Your
program must be written in x86-64 assembly language. You may make calls to system functions
and functions in the C standard library (highly recommended). Comment and document all code
submitted! Your program will be tested on ritchie.cs.tcu.edu. You may do development work
on your personal machines but final submissions must compile without errors or warnings and execute
without core dumping. Use good programming practices by implementing procedures and
functions where necessary. Your subroutines must follow the X86-64 Linux ABI for passing arguments
to functions. This project is worth 100 points.
Project Deliverables
1. Follow the project submission guidelines.
2. Follow the project documentation standards.
3. Your project must have a Makefile and a README file.
4. Submit your .zip file to the dropbox on TCU Online.
Spring 2017 Version: 03022017-001 4

Order from us and get better grades. We are the service you have been looking for.