Question

Introduction: Write a MIPS program to allow a user to play a simple variation of the game BINGO. Your program should display the following game board and the player wants to choose a location to mark: BINGO A position can be marked by entering its column letter (either B I, N, G, or O) and row number (either 1, 2, 3, 4, or 5). An X should mark the positions already marked. An underscore, i.e., should represent unmarked positions.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

main:
push rbp
mov rbp, rsp
push rbx
sub rsp, 152
mov edi, 0
call time
mov edi, eax
call srand
.L34:
mov edi, OFFSET FLAT:.LC0
call system
mov esi, OFFSET FLAT:.LC1
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov esi, OFFSET FLAT:std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
mov DWORD PTR [rbp-20], 0
.L5:
cmp DWORD PTR [rbp-20], 4
jg .L2
mov DWORD PTR [rbp-24], 0
.L4:
cmp DWORD PTR [rbp-24], 4
jg .L3
call rand
mov ecx, eax
mov edx, 1374389535
mov eax, ecx
imul edx
sar edx, 5
mov eax, ecx
sar eax, 31
sub edx, eax
imul eax, edx, 100
sub ecx, eax
mov edx, ecx
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rcx, eax
mov rax, rcx
sal rax, 2
add rax, rcx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], edx
add DWORD PTR [rbp-24], 1
jmp .L4
.L3:
add DWORD PTR [rbp-20], 1
jmp .L5
.L2:
mov esi, OFFSET FLAT:.LC2
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov esi, OFFSET FLAT:std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
mov esi, OFFSET FLAT:.LC3
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov DWORD PTR [rbp-20], 0
.L32:
cmp DWORD PTR [rbp-20], 4
jg .L6
mov DWORD PTR [rbp-24], 0
.L31:
cmp DWORD PTR [rbp-24], 4
jg .L7
cmp DWORD PTR [rbp-24], 0
jne .L8
call rand
mov ecx, eax
mov edx, -2004318071
mov eax, ecx
imul edx
lea eax, [rdx+rcx]
sar eax, 3
mov edx, eax
mov eax, ecx
sar eax, 31
sub edx, eax
mov eax, edx
mov edx, eax
sal edx, 4
sub edx, eax
mov eax, ecx
sub eax, edx
mov edx, DWORD PTR [rbp-24]
movsx rsi, edx
mov edx, DWORD PTR [rbp-20]
movsx rcx, edx
mov rdx, rcx
sal rdx, 2
add rdx, rcx
add rdx, rsi
mov DWORD PTR [rbp-144+rdx*4], eax
cmp DWORD PTR [rbp-20], 0
jne .L9
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
mov DWORD PTR [rbp-44], eax
jmp .L10
.L9:
cmp DWORD PTR [rbp-20], 1
jne .L11
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
mov DWORD PTR [rbp-28], eax
jmp .L10
.L11:
cmp DWORD PTR [rbp-20], 2
jne .L12
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
mov DWORD PTR [rbp-40], eax
jmp .L10
.L12:
cmp DWORD PTR [rbp-20], 3
jne .L13
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
mov DWORD PTR [rbp-36], eax
jmp .L10
.L13:
cmp DWORD PTR [rbp-20], 4
jne .L10
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
mov DWORD PTR [rbp-32], eax
jmp .L10
.L8:
cmp DWORD PTR [rbp-24], 1
jne .L14
call rand
mov ecx, eax
mov edx, -2004318071
mov eax, ecx
imul edx
lea eax, [rdx+rcx]
sar eax, 4
mov edx, eax
mov eax, ecx
sar eax, 31
sub edx, eax
imul eax, edx, 30
sub ecx, eax
mov edx, ecx
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rcx, eax
mov rax, rcx
sal rax, 2
add rax, rcx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], edx
.L17:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 15
jg .L15
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax+30]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
jmp .L16
.L15:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 30
jle .L16
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax-1]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
.L16:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 15
jg .L10
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 30
jle .L10
jmp .L17
.L14:
cmp DWORD PTR [rbp-24], 2
jne .L18
call rand
mov ecx, eax
mov edx, -2004318071
mov eax, ecx
imul edx
lea eax, [rdx+rcx]
sar eax, 3
mov edx, eax
mov eax, ecx
sar eax, 31
sub edx, eax
mov eax, edx
mov edx, eax
sal edx, 4
sub edx, eax
mov eax, ecx
sub eax, edx
mov edx, DWORD PTR [rbp-24]
movsx rsi, edx
mov edx, DWORD PTR [rbp-20]
movsx rcx, edx
mov rdx, rcx
sal rdx, 2
add rdx, rcx
add rdx, rsi
mov DWORD PTR [rbp-144+rdx*4], eax
.L21:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 30
jg .L19
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax+45]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
jmp .L20
.L19:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 45
jle .L20
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax-1]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
.L20:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 30
jg .L10
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 45
jle .L10
jmp .L21
.L18:
cmp DWORD PTR [rbp-24], 3
jne .L22
call rand
mov ecx, eax
mov edx, -2004318071
mov eax, ecx
imul edx
lea eax, [rdx+rcx]
sar eax, 3
mov edx, eax
mov eax, ecx
sar eax, 31
sub edx, eax
mov eax, edx
mov edx, eax
sal edx, 4
sub edx, eax
mov eax, ecx
sub eax, edx
mov edx, DWORD PTR [rbp-24]
movsx rsi, edx
mov edx, DWORD PTR [rbp-20]
movsx rcx, edx
mov rdx, rcx
sal rdx, 2
add rdx, rcx
add rdx, rsi
mov DWORD PTR [rbp-144+rdx*4], eax
.L25:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 45
jg .L23
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax+60]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
jmp .L24
.L23:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 60
jle .L24
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax-1]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
.L24:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 45
jg .L10
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 60
jle .L10
jmp .L25
.L22:
cmp DWORD PTR [rbp-24], 4
jne .L10
call rand
mov ecx, eax
mov edx, -2004318071
mov eax, ecx
imul edx
lea eax, [rdx+rcx]
sar eax, 3
mov edx, eax
mov eax, ecx
sar eax, 31
sub edx, eax
mov eax, edx
mov edx, eax
sal edx, 4
sub edx, eax
mov eax, ecx
sub eax, edx
mov edx, DWORD PTR [rbp-24]
movsx rsi, edx
mov edx, DWORD PTR [rbp-20]
movsx rcx, edx
mov rdx, rcx
sal rdx, 2
add rdx, rcx
add rdx, rsi
mov DWORD PTR [rbp-144+rdx*4], eax
.L28:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 60
jg .L26
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax+60]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
jmp .L27
.L26:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 90
jle .L27
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
lea ecx, [rax-1]
mov eax, DWORD PTR [rbp-24]
movsx rsi, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rsi
mov DWORD PTR [rbp-144+rax*4], ecx
.L27:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 60
jg .L10
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov eax, DWORD PTR [rbp-144+rax*4]
cmp eax, 75
jle .L10
jmp .L28
.L10:
cmp DWORD PTR [rbp-20], 2
jne .L29
cmp DWORD PTR [rbp-24], 2
jne .L29
mov esi, OFFSET FLAT:.LC4
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
jmp .L30
.L29:
mov eax, DWORD PTR [rbp-24]
movsx rcx, eax
mov eax, DWORD PTR [rbp-20]
movsx rdx, eax
mov rax, rdx
sal rax, 2
add rax, rdx
add rax, rcx
mov ebx, DWORD PTR [rbp-144+rax*4]
mov esi, OFFSET FLAT:.LC5
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
mov esi, ebx
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(int)
mov esi, OFFSET FLAT:.LC5
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
.L30:
add DWORD PTR [rbp-24], 1
jmp .L31
.L7:
mov esi, OFFSET FLAT:.LC6
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
add DWORD PTR [rbp-20], 1
jmp .L32
.L6:
mov esi, OFFSET FLAT:.LC7
mov edi, OFFSET FLAT:std::cout
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
lea rax, [rbp-148]
mov rsi, rax
mov edi, OFFSET FLAT:std::cin
call std::basic_istream<char, std::char_traits<char> >::operator>>(int&)
mov eax, DWORD PTR [rbp-148]
test eax, eax
je .L33
jmp .L34
.L33:
mov eax, 0
add rsp, 152
pop rbx
pop rbp
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L38
cmp DWORD PTR [rbp-8], 65535
jne .L38
mov edi, OFFSET FLAT:std::__ioinit
call std::ios_base::Init::Init()
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:std::__ioinit
mov edi, OFFSET FLAT:std::ios_base::Init::~Init()
call __cxa_atexit
.L38:
nop
leave
ret
_GLOBAL__sub_I_main:
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret​

Add a comment
Know the answer?
Add Answer to:
Introduction: Write a MIPS program to allow a user to play a simple variation of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Introduction Write a MIPS program to allow a user to play a simple variation of the...

    Introduction Write a MIPS program to allow a user to play a simple variation of the game BINGO. Your program should display the following game board and the player wants to choose a location to mark BINGO A position can be marked by entering its column letter (eit B', 'I', 'N' 'G', or CO and row number (either 1, 2, 3, 4, or 5). An 'X' should mark the positions already marked. An underscore, e C 1 should represent unmarked...

  • 18. Tic-Tac-Toe Game rite a program that allows two players to play a game of tic-tac-toe. Use di...

    18. Tic-Tac-Toe Game rite a program that allows two players to play a game of tic-tac-toe. Use dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The program should run a loop that does the following: Write . Displays the contents of the board array. . Allows player 1 to select a location on the board for an X. The program should ask the...

  • Tic-Tac-Toe Game Write a program that allows two players to play a game of tic-tac-toe. Use...

    Tic-Tac-Toe Game Write a program that allows two players to play a game of tic-tac-toe. Use a two-dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The program should run a loop that does the following: Displays the contents of the board array. Allows player 1 to select a location on the board for an X. The program should ask the user to enter...

  • Using C Programming: (use printf, scanf) 18. Tic-Tac-Toc Game Write a program that allows two players...

    Using C Programming: (use printf, scanf) 18. Tic-Tac-Toc Game Write a program that allows two players to play a game of tic-tac-toc. Use a two- dimensional char array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The program should run a loop that Displays the contents of the board array Allows player 1 to select a location on the board for an X. The program should...

  • Use Java language to create this program Write a program that allows two players to play...

    Use Java language to create this program Write a program that allows two players to play a game of tic-tac-toe. Using a two-dimensional array with three rows and three columns as the game board. Each element of the array should be initialized with a number from 1 - 9 (like below): 1 2 3 4 5 6 7 8 9 The program should run a loop that Displays the contents of the board array allows player 1 to select the...

  • C++ Hangman (game) In this project, you are required to implement a program that can play...

    C++ Hangman (game) In this project, you are required to implement a program that can play the hangman game with the user. The hangman game is described in https://en.wikipedia.org/wiki/Hangman_(game) . Your program should support the following functionality: - Randomly select a word from a dictionary -- this dictionary should be stored in an ASCII text file (the format is up to you). The program then provides the information about the number of letters in this word for the user to...

  • I need screenshots for this solution done in Flowgorithm. Thank you. Tic-Tac-Toe Game Design a program...

    I need screenshots for this solution done in Flowgorithm. Thank you. Tic-Tac-Toe Game Design a program that allows two players to play a game of tic-tac-toe. Use a two- dimensional String array with three rows and three columns as the game board. Each element of the array should be initialized with an asterisk (*). The program should run a loop that does the following: a. Displays the contents of the board array. b. Allows player 1 to select a location...

  • INTRODUCTION: Play sorry with two die, and one peg. Move your piece down the board first....

    INTRODUCTION: Play sorry with two die, and one peg. Move your piece down the board first. But rolling certain numbers will change the pace of the game. INCLUDE IN YOUR ASSIGNMENT: Annotation is a major part of any program. At the top of each of your C++ programs, you should have at least four lines of documentation: // Program name: tictactoe.cpp // Author: Twilight Sparkle // Date last updated: 5/26/2016 // Purpose: Play the game of Tic-Tac-Toe ASSIGNMENT: Sorry Game...

  • Write a program to Simulate a game of tic tac toe in c#

    Write a program to Simulate a game of tic tac toe. A game of tic tac toe has two players. A Player class is required to store /represent information about each player. The UML diagram is given below.Player-name: string-symbol :charPlayer (name:string,symbol:char)getName():stringgetSymbol():chargetInfo():string The tic tac toe board will be represented by a two dimensional array of size 3 by 3 characters. At the start of the game each cell is empty (must be set to the underscore character ‘_’). Program flow:1)    ...

  • Write a c program that will allow two users to play a tic-tac-toe game. You should...

    Write a c program that will allow two users to play a tic-tac-toe game. You should write the program such that two people can play the game without any special instructions. (assue they know how to play the game). Prompt first player(X) to enter their first move. .Then draw the gameboard showing the move. .Prompt the second player(O) to enter their first move. . Then draw the gameboard showing both moves. And so on...through 9 moves. You will need to:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT