This game is a two player game
We will determine which piece will be added by rolling the dice.
There are six pieces and matched with the dice numbers as
1 vase.
2 legs
3 body
4 left wing
5 right wing
6 head
The bird image must be completed starting from the vase and next piece must be connected to the image on screen. For example, there is no piece in the screen, players must roll dice until 1 comes. When pieces 1 and 2 are on the screen, next piece can only be piece 3. After piece 3 is completed, pieces 4, 5, and 6 can be placed on the image since all three are connected with piece 3.
The player uses space key to roll the dice.
The player’s aim is to complete the bird first.
I have really problem to do this main part of the code .
I tried to add the data as
.model small
.stack 100h
.data
; Bird parts
bird_part1 db ” __________/ “, 0
bird_part2 db ” // “, 0
bird_part3 db ” // “, 0
bird_part4 db ” .-~~. .–. .~~-. “, 0
bird_part5 db ” .-~.-~.- `. { O ]]>.’ -.~-.~-. “, 0
bird_part6 db ” .-~.-~.-~.-~. | | / .~-.~-.~-.~-. “, 0
; Player scores
player1_score dw 0
player2_score dw 0
; Dice roll and current piece
dice_roll dw 0
current_piece dw 0
; Player names and lengths
player_name_max_length equ 20
player1_name db player_name_max_length dup (?)
player2_name db player_name_max_length dup (?)
player1_length db 0
player2_length db 0
; Menu text and prompts
menu_text db "1. Single Player", 0Dh, 0Ah, "2. Two Players", 0Dh, 0Ah, "$"
prompt_player1 db "Enter Player 1 name: $"
prompt_player2 db "Enter Player 2 name: $"
; Roll prompt
roll_prompt db "Press SPACE to roll the dice...", 0
Then whatt??
asli is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.