Find Jobs
Hire Freelancers

Assembly language code

$10-30 USD

Peruutettu
Julkaistu noin 6 vuotta sitten

$10-30 USD

Maksettu toimituksen yhteydessä
Tic Tac Toe Game .data currentState: .asciiz "This is the current state of the GameBoard:\n" playerOne: .asciiz "Player One won\n" playerTwo: .asciiz "Player Two won\n" playerNone: .asciiz "No winners found\n" enterMove: .asciiz "\nEnter a board position (0-8) to make move:\n" invalidMove: .asciiz "\nInvalid move - try again.\n" CR: .byte '\n SPACE: .byte 0x20 O: .byte 'o X: .byte 'x DOT .byte '. player: .byte 0x01 gameBoard: .byte 0,0,0,0,0,0,0,0,0 # fresh clean empty gameboard .code .globl main ########################################################################## # CheckTriplet # Check the gameboard positions matching the triplet passed in # to determine either player has won that specific triplet. # # Input: # $a0 : first position to check on gameboard # $a1 : second position to check on gameboard # $a2 : third position to check on gameboard # # Output: # $v0 : 0 = no winner found # $v0 : 1 = player one won # $v0 : -1 = player two won # AS WELL AS an appropriate message if player one or player two has won # ########################################################################## CheckTriplet: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # CheckForWin # Invoke CheckTriplet against the 8 possible winning combinations # to determine if anyone has won the game yet # row 0 # row 1 # row 2 # col 0 # col 1 # col 2 # diagonal 0 # diagonal 1 # # Output: # $v0 : 0 = no winner found # $v0 : 1 = player one won # $v0 : -1 = player two won ########################################################################## CheckForWin: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # PRINTBOARD ########################################################################## PrintBoard: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # RequestMove # # ToDo: # return $v0 = player's choice to move to that is valid # ########################################################################## RequestMove: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # CheckForMoreMoves # # ToDo: # return $v0 = 0 if no more moves left on gameBoard # return $v0 = 1 if yes there are more moves left on gameBoard # ########################################################################## CheckForMoreMoves: # COPY YOUR PAST IMPLEMENTATION HERE ########################################################################## # TOGGLEPLAYER ########################################################################## TogglePlayer: lb $t0,player sub $t0,$zero,$t0 sb $t0,player jr $ra # return from function call ########################################################################## # MAIN ########################################################################## main: # Print the board # request the move # apply the move to the board & toggle player # check for win # check for more moves # loop until win or draw # if no winners found, say so and exit # print the board one last time before exiting # exit
Projektin tunnus (ID): 16333840

Tietoa projektista

1 ehdotus
Etäprojekti
Aktiivinen 6 vuotta sitten

Haluatko ansaita rahaa?

Freelancerin tarjouskilpailun edut

Aseta budjettisi ja aikataulu
Saa maksu työstäsi
Kuvaile ehdotustasi
Rekisteröinti ja töihin tarjoaminen on ilmaista
1 freelancerit tarjoavat keskimäärin $20 USD tätä projektia
Käyttäjän avatar
Sir I have vast experience in assembly language,u can view my profile and complete on time.I am a full time freelancer, working for more than 2 years now. Have clients from different parts of the world.
$20 USD 1 päivässä
4,6 (19 arvostelua)
4,4
4,4

Tietoja asiakkaasta

Maan UNITED STATES lippu
United States
0,0
0
Maksutapa vahvistettu
Liittynyt helmik. 17, 2018

Asiakkaan vahvistus

Kiitos! Olemme lähettäneet sinulle sähköpostitse linkin, jolla voit lunastaa ilmaisen krediittisi.
Jotain meni pieleen lähetettäessä sähköpostiasi. Yritä uudelleen.
Rekisteröitynyttä käyttäjää Ilmoitettua työtä yhteensä
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ladataan esikatselua
Lupa myönnetty Geolocation.
Kirjautumisistuntosi on vanhentunut ja sinut on kirjattu ulos. Kirjaudu uudelleen sisään.