[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

8chan Bitcoin address: 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C
The next generation of Infinity is here (discussion) (contribute)
A message from @CodeMonkeyZ, 2ch lead developer: "How Hiroyuki Nishimura will sell 4chan data"
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


1ec00d No.2865

Hey guys, first time posting. Im programming a battle card game and im just having some trouble on drawing a random card from a deck of 60 cards and removing the card from the deck completely.

Ive been using a random number generator to test this but since you cant take a variable out of an array it makes it a bit hard. I'll post my code my next post.

1d7a9c No.2870

use a list, remove drawn cards from the list.

look at random foss software that does this, e.g. a realistic blackjack simulator:

http://sourceforge.net/projects/ultimate-21/

btw even with just a single deck counting cards gives very low profit and is boring as fuck. but maybe it's more fun irl.




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]