Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Help making a poker game.

edited August 2014 in Help! with 1.x
So I want to make a five card draw poker game with you vs the computer and I have a few questions
-How to I make $whatever non repeatable?  I need it so each variable is only usable once.  (That way you don't have two ace of hearts).
-How do I make the background white and the text black?
-How do I make certain variables certain colors?  (I want the heart and diamond cards to have red text).  I would have code like: <<set $card1 to either(2 Hearts, 2 Diamonds, 2 Clubs, 2 Spades...)>>
-How do I make it recognize variable patterns?  To make it know about pairs, straights, etc.

Comments

  • Card games with extensive rules can be very difficult to simulate in any language.  Double Fanucci in Zork Zero (I think) was a made up game that simulated play but was essentially a very neat trick to fool the player into thinking they were playing a ridiculously complicated card game but it was actually a puzzle.  (The trick was a lot like Mornington Crescent.)

    One way would be to use lists, which I'm uncertain whether is supported in Twine (it is in another program I use called AXMA.)  You would create lists for cards in the deck, cards in the player's hand, cards in the opponent's hand, and cards in the discard pile. 

    Barring that, the next thing I could think of would be assign each card a number variable based on its status.  For example, if $2ofclubs is 0 it's undealt, 1 is in the player's hand, 2 if it's in the opponent's hand, 3 if it's discarded, etc.  Now that I think of that, it would be ridiculously difficult.

    Is poker essential to the game?  Could you do a slot machine, which would be infinitely easier?

    Or make up a game?  I managed to make a surprisingly simple and interesting game in StoryNexus using their built in card drawing mechanic that was essentially like a slot machine where you could deal three cards and hold onto specific cards and deal again to try and make 3 of a kind.
Sign In or Register to comment.