User Profile

Collapse

Profile Sidebar

Collapse
imran akhtar
imran akhtar
Last Activity: Jan 19 '09, 01:25 AM
Joined: Nov 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • imran akhtar
    replied to blackjack
    so is it possiable of you can explain bit more, how i would display the hands.

    thanks
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    ok, a bit confused, dont understand how i would start it, thanks
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    black jack

    yeh thanks, after few changes it is now wroking, is there a way of how i would display total hands played, at the end of game, for both computer and player
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    black jack

    thnaks for ur help with updating the score, it now works, but i have two main problem, firstly how would i now get the ace to be 1 and 11, and a way of displaying the total hands played at the end of the game.

    thanks for the help


    below is my code,

    Code:
    import random 
        
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]
    player=[]
    computer=[]
    ...
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    hey. i dont think you seem to understand. i've done my own code and would rather stick to how it is, i appreciate u writing ur own version of the code but i would rather stick with mine, and jus fix the 'hit' function. you say i can fix it by creating a function to calculate the total, how would i do that?

    thanks.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    ok so it is not updating because the total itself is not updating. do you know how i can change it so the total updates?

    thanks.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    I added in what you told me to bvdet, and i get no errors, but when i 'hit', another card is not dealt and it still comes up with the previous total.

    here is my code now:

    Code:
    import random 
     
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]
    player=[]
    computer=[]
    random.shuffle(deck)  #this will shuffle the cards in the deck
    nextCard = 0
    player.append(deck[nextCard])
    ...
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    thanks for your post, which may be helpful for other parts of my code, however my main problem is getting the "hit" function to work, as it is not working at the moment. have a look previous posts in this thread, and then could you be able to help me fix the "hit"?

    thanks once again.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    i have tried the second option, but does not seem to work.


    Code:
    import random 
        
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]
    player=[]
    computer=[]
    random.shuffle(deck)  #this will shuffle the cards in the deck
    nextCard = 0
    player.append(deck[nextCard]) 
    nextCard += 1 
    player.append(deck[nextCard]) # nextCard is now 1. 
    nextCard
    ...
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    thanks for ur help before "boxfish" , i was able, proceed and pretty much complete my blackjack code. however, i have come across a minor problem, my hit function does not seem to work. do you know how i can fix this. also, does anyone know how i can fit a re-run code into my program too?

    Code:
    import random 
     
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]
    player=[]
    computer=[]
    ...
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack
    blackjack

    ok thanks no i dont have no erros,, but how would i display the players hand, computers hand.

    below is how the code looks now, but, would have to keep the code commeted out, as that think would display the, hands.

    thanks for help

    Code:
    import random 
        
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10,11]*4
    player=[]
    computer=[]
    random.shuffle(deck)
    ...
    See more | Go to post
    Last edited by imran akhtar; Jan 16 '09, 12:26 PM. Reason: forgot

    Leave a comment:


  • imran akhtar
    started a topic blackjack

    blackjack

    hi, i am making black jack code, but i am stuck, i have made start, but for reason gettin errors, which i dont seem be able to fix, below is my code wht i started.

    Code:
    import random 
        
    deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10,11]*4
    player=[]
    computer=[]
    #r = random.randint
     
    computer.append(random.randint(deck))
    player.append(random.randint(deck))
    computer.append(random.randint(deck))
    ...
    See more | Go to post

  • imran akhtar
    replied to blackjack game
    hi, does anyone, know the forums, email address or contanct details , i found this one "privacy@bytes. com" but does not seem to work, as i sent emails, and does seem to be a valid email address keeps failing to be sent .
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    this code is a poontoon rule, or is a stick at 16 rule.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    i played the game, it is pretty good, is this the complete code.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    would do u mean by "At this time, there is no check for "blackjack" or "natural" (a total of 21 in your first two cards)."
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    this qucik question wht does it mean , by the pontoon’ rule.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    ok thanks, when you have time, please do so, i am very greatful, for your help.
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    thanks for ur help, but the code, above, is bit counfusing, as it runs, how do i actually play it,
    See more | Go to post

    Leave a comment:


  • imran akhtar
    replied to blackjack game
    blackjack

    if you can just help me with this code, i be very much obliged, with this black jack code, it which works, fine, but how do i get the Aces count as 1 or 11. belwo is the code, which is allready made, how and were would i add in the new aces code.

    Code:
    import random as r
    deck = [2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 11]*4
    computer = []
    player = []
    c = 'y'
    
    #Clear works
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...