This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Releases => Your Projects
Author Message
alexrudd
pm me if you read this


Bandwidth Hog


Joined: 06 Oct 2004
Posts: 2335

Posted: 21 Jun 2005 03:52:31 pm    Post subject:

File Name :: Poker v1.1
Author :: alexrudd
Category :: Ti-83plus Basic Games
Screenshot :: [img]http://www.unitedti.org/index.php?act=downloads&do=imgss&id=73[/img]
Description ::
*Includes both one and two player (link cable) versions.
*Emulates full 52-card deck (for you card counters out there!)
*Fast shuffling routine, barely noticeable
*Automatic detection of hand, up to 4 of a kind!
*Under 1000 bytes!

View File
Back to top
alexrudd
pm me if you read this


Bandwidth Hog


Joined: 06 Oct 2004
Posts: 2335

Posted: 21 Jun 2005 03:55:34 pm    Post subject:

Can't edit, problem with "dynamic image tags"

I consider this a work in progress, it could use a graphics reworking. But it is still functional, and does almost everything I wanted it to. (still need to do betting...) It shouldn't be edit-locked, but if it is I will post the source for suggestions.
Back to top
leofox
INF student


Super Elite (Last Title)


Joined: 11 Apr 2004
Posts: 3562

Posted: 22 Jun 2005 07:29:11 am    Post subject:

How did you emulate a 52 card deck?
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 22 Jun 2005 08:27:56 am    Post subject:

seq(X,X,1,13.75,.25

For A=1, 2=2,.... and four suits (.0, .25, .5, .75)

seq(X,X,1,52

For A=1-4, 2=5-8,.... (Not sure why you would want to use this)

seq(int(X),X,1, 13.75,.25

A=1, 2=2,... No suits

Side note: You can then shuffle very easily

rand(52)->L1
SortA(L1,(your card list)
Delvar L1

Spyderbyte
Back to top
alexrudd
pm me if you read this


Bandwidth Hog


Joined: 06 Oct 2004
Posts: 2335

Posted: 22 Jun 2005 12:23:31 pm    Post subject:

Close, but I improved the shuffling.
I used the first one Spiderbyte posted

Code:
seq(X,X,1,13.75,.25
L1 is still random and used for shuffling, but instead of creating a new L1 each time (which is the biggest bottleneck), I added a line to the getKey loop. (simplified here, but you get the idea)
Code:
Repeat Ans
rand->L1(randInt(1,52
getKey
End
That way L1 is constantly changing, and does not have to be regenerated.
Back to top
aforsy
the leaping penguin


Active Member


Joined: 13 Jul 2004
Posts: 653

Posted: 22 Jun 2005 01:50:57 pm    Post subject:

graphics wise you can use the card-drawing system from my blackjack game on ticalc. it draws nice-looking cards very quickly.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement