Færdiggjort

Using [login to view URL] Complete the work

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.

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

Se mere: assembler floating point program, write program using pic ammeter design, write program student information system using database, integers separated digits write program using, ability apply analytical skills complete work, write program adds large integers using linked lists, write program will sum integers using pointers, using as30 add cart work, bidder submit complete work person getafreelancer, complete work 20daysmeena completed work daysdays work, complete work excel, pdf file complete work word, electrical work flat, finish-complete-work-wordpress-website/, All Complete Work 100%Dear Hiring Manager,Its my pleasure to offer you my best aservices for ASP.NET development. I am available, letter to contractor to complete work, how to stop employees from using cell phones at work, using cell phone at work

Om arbejdsgiveren:
( 0 bedømmelser ) North Richland Hills, United States

Projekt ID: #30987434

Tildelt til:

SUog

Hello, I have already written this program using fasm. Upon request I can send the executable for you to check. Thank you

$50 USD på 1 dag
(166 bedømmelser)
6.3

2 freelancere byder i gennemsnit $35 timen for dette job

yanghwang708

Hi I have good experiences for MIPS(MARS), x86Assembler and FAssem. I have read your all description carefully and I understand your requirement. So I think I can deliver you good result. Best regards

$20 USD på 1 dag
(2 bedømmelser)
1.8