01-18-2025 03:18 AM
my program will deal 5 random cards from a deck of 52 cards and display them on the interface(each card includes information about its suit and numbers,and no card can be repeated)
sufferring issue in I use HEX so card number is 1-9,A,B,C,D
how to transform card numbers to A,2,3,4,5,6,7,8,9,10,J,Q,K
01-18-2025 04:02 AM - edited 01-18-2025 04:03 AM
Hi iron,
@ironaaron wrote:sufferring issue in I use HEX so card number is 1-9,A,B,C,D
how to transform card numbers to A,2,3,4,5,6,7,8,9,10,J,Q,K
You can "transform" by using a lookup table...
Why do you use "HEX" instead of ordinary integer datatype? (Posting from mobile, so no access to your VI.)
01-18-2025 11:42 AM - edited 01-18-2025 11:43 AM
01-18-2025 01:51 PM
@ironaaron wrote:
my program will deal 5 random cards from a deck of 52 cards and display them on the interface(each card includes information about its suit and numbers,and no card can be repeated)
sufferring issue in I use HEX so card number is 1-9,A,B,C,D
how to transform card numbers to A,2,3,4,5,6,7,8,9,10,J,Q,K
You can make it more fun by adding some images. Generating the hand is the easy part, scoring multiple hands is a more fun code challenge : )
PS: Let me know if you want to do Roulette, that is my favorite.
01-18-2025 01:56 PM - edited 01-18-2025 01:59 PM
I would cache the LUT once at the start of the program. This will be so fast that measure timing is pointless.
01-18-2025 09:54 PM
Partial deck how to create image, need to use picture ring vi.?(unfortune don't has this vi)
Index array how to connect none double data in n-dimension array
tks your reply
01-18-2025 09:55 PM
Learned look up table form tks
01-18-2025 09:57 PM
your conclusion really helpful for me tks a lots!
01-19-2025 11:26 AM
@ironaaron wrote:Index array how to connect none double data in n-dimension array
What does that mean? (e.g. what is "none double data"?)
You posted three different replies, but we don't know what post you are replying to. It helps to quote parts of the relevant post.
01-20-2025 10:20 AM
@ironaaron wrote:
Partial deck how to create image, need to use picture ring vi.?(unfortune don't has this vi)
Index array how to connect none double data in n-dimension array
tks your reply
1) This is a way to load a png file to a LabVIEW picture object. There are many ways to programmatically modify the image once it is loaded. Once you load a picture you can make it constant and save it with the VI.
2) Not sure what you are asking, maybe this helps?