|
-
Jan 12th, 2000, 10:42 AM
#1
Thread Starter
Member
Ok, im makeing a yatzee type game and i'm having a little trouble with checking for matches. If you have any ideas on how i can get it work or just improve my code, that would be great. here's what i have so far:
dim matches(5)
for i =cmddice.lbound to cmddice.ubound
for j=cmddice.lbound to cmddice.ubound
if i<>j and cmddice(i).caption = cmddice(j).caption then
matches(cmddice(i).caption)=matches(cmddice(i).caption)+1
end if
next i
next i
Thats what im trying to use to determine how many dice i have of each value. what should i do?
-
Jan 12th, 2000, 12:25 PM
#2
Lively Member
Hey i just programed a game that had the same thing.
this is from a craps game i programmed. You have to have a hidden image(0) when the dice is equal.
imgDice(die1).Visible = True
If die2 <> die1 Then
imgDice(die2).Visible = True
Else
imgDice(0).Picture imgDice(die2).Picture
imgDice(0).Visible = True
End If
If you like i can send the code for the application.
Regards,
Scott
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|