online strip poker site

lithse

New Member
Jun 7, 2019
2
0
Hi, I would like to try to create an online strip poker site (no real money) to give myself a goal and learn to code. (I'm starting from scratch)
I'm sure it's been a lot of work, but if you have any advice or ideas on how to do it and what to learn, please let me know.
I'll also try to post updates on the project as I go along.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,963
16,197
I'm sure it's been a lot of work,
Not really. For someone knowing coding it's a two-three days of works at max, including a small "is he bluffing" part. Most of the difficulty being for the computer decision tree.

but if you have any advice or ideas on how to do it
For Texas Holden rules, and roughly defined:
Code:
# list with all the cards.
baseCards = [ 1h, 2h, 3h, 4h, 5h, 6h, 7h, 8h, [...] 9s, Js, Qs, Ks ]

# Start a new round
newRound
    cards = SHUFFLE baseCards

    # Reset the game state
    for i = 1 to numberOfPlayer
        player[i] = []
    common = []

    # Distribute the cards
    for j = 1 to 2
        for i = 1 to numberOfPlayers
            player[i] = player[i] + POP FIRST IN cards
           
    for i = 1 to 2
        common = common + POP FIRST IN cards

    for i = 1 to 3
        refreshScreen
        playRound
        common = common + POP FIRST IN cards

     computeWinner

refreshScreen
    for i = 1 to numberOfPlayers
        # Display the correct card at the correct place
        display player[i][0]
        display player[i][1]

playRound
    roundComplete = False

    while roundComplete == False
        computePlayer || askPlayerAction

and what to learn [...]
Since you want it to be online, JavaScript for the code. It's really basic and can be done at 100% client side.
And of course probability to handle of the computer handled decision.


But, of course, this is for a poker AI-like at the usual level found in game. If you want it at level, it's something else, and one full year would probably not be enough for someone starting with no knowledge.
 

lithse

New Member
Jun 7, 2019
2
0
Not really. For someone knowing coding it's a two-three days of works at max, including a small "is he bluffing" part. Most of the difficulty being for the computer decision tree.



For Texas Holden rules, and roughly defined:
Code:
# list with all the cards.
baseCards = [ 1h, 2h, 3h, 4h, 5h, 6h, 7h, 8h, [...] 9s, Js, Qs, Ks ]

# Start a new round
newRound
    cards = SHUFFLE baseCards

    # Reset the game state
    for i = 1 to numberOfPlayer
        player[i] = []
    common = []

    # Distribute the cards
    for j = 1 to 2
        for i = 1 to numberOfPlayers
            player[i] = player[i] + POP FIRST IN cards
          
    for i = 1 to 2
        common = common + POP FIRST IN cards

    for i = 1 to 3
        refreshScreen
        playRound
        common = common + POP FIRST IN cards

     computeWinner

refreshScreen
    for i = 1 to numberOfPlayers
        # Display the correct card at the correct place
        display player[i][0]
        display player[i][1]

playRound
    roundComplete = False

    while roundComplete == False
        computePlayer || askPlayerAction



Since you want it to be online, JavaScript for the code. It's really basic and can be done at 100% client side.
And of course probability to handle of the computer handled decision.


But, of course, this is for a poker AI-like at the usual level found in game. If you want it at level, it's something else, and one full year would probably not be enough for someone starting with no knowledge.
you're my new god, thanks for the answer