Lukket

Using the flat assembler (fasm), write a program that plays tic-tac-toe against the computer

Using the flat assembler (fasm), write a program that plays tic-tac-toe against the computer. Below is a sample game loop. It assumes the player is X and computer is O with the player making the first move.

gameLoop:

call printBoard

cinvoke printf, "Your move (1-9)? "

cinvoke scanf, "%d", Square

call placeX

call checkXWin

call checkForDraw

call computerMove

call checkOWin

jmp gameLoop

For the computerMove, you could simply place an O in the first available square, select a random square, or do these steps:

1. check if computer "O" can win

else

2. check if computer can block player "X" from winning

else

3. select a random square to move into

Example output

Welcome to x86 Assembly Tic-tac-toe!

You will be X's and the computer will be O's.

The squares are number 1 - 9 starting with the top left.

| |

---|---|---

| |

---|---|---

| |

Your move (1-9)? 5

| | O

---|---|---

| X |

---|---|---

| |

Your move (1-9)? 1

X | | O

---|---|---

| X |

---|---|---

| | O

Etc.

{"mode":"full","isActive":false}

Evner: Montage, C programmering, x86-x64 Assembler, C++ Programmering, Software Arkitektur

Se mere: create tic tac toe using turbo documentation, tic tac toe code turbo program, tic tac toe using ajax php mysql, tic tac toe java program, java program gui tic tac toe, tic tac toe using jframe, tic tac toe code using jframe, using solve tic tac toe, using genetic programming solve tic tac toe, tic tac toe multiplayer server game, program play tic tac toe, program tic tac toe java using gui, program tic tac toe game using small basic, tic tac toe java touch game, how to program a tic tac toe board in python, tic tac toe program in java using swing, ai plays tic tac toe, tic tac toe program in c using graphics, c program for tic tac toe game using graphics

Om arbejdsgiveren:
( 0 bedømmelser ) Salem, India

Projekt ID: #30954836

2 freelancere byder i gennemsnit ₹1200 timen for dette job

aemgborgess

Hello i can handle this type of job for [login to view URL] free to message me. i will do my best in job for sure

₹1300 INR på 1 dag
(1 bedømmelse)
1.2
Omarkthiri0

Hi , I am an expert , I can do this work so perfectly , just let me do it . CONTACT ME PLEASE ! 100% satisfaction guarantee 100% satisfaction priority

₹1100 INR på 1 dag
(1 bedømmelse)
0.6