Reputation: 1 Apprentice
- Active Posts:
- 15 (0.02 per day)
- 23-June 12
- Profile Views:
- Last Active:
- Sep 20 2012 12:09 PM
- Dream Kudos:
Posts I've Made
Posted 20 Sep 2012I have tried everything (except the thing that works) to get the game to run and I can't seem to get it to. I am running Windows7. I don't know how to get it to run in cmd.exe.
I have tried using the python GUI, python commandline, typing
C:\dic\tuts\blackjack>python pyblackjack.pyand other things to get it to run and I have run out of ideas. And as I am a nub I did also try all the above from a full copy of the original too so as to negate the possibility that it maybe a typo or two in my copy that's to blame and it isn't that. I may also be blind and just didn't see the instructions for getting it to run in the cmd console. I also have tried to open it in the commandline but can't seem to get the syntax right for opening files or running them. I tried open and file to no avail I get "file not found" type errors or outside the py interpreter "is not an internal command" type ones. And I can't seem to find anything via Google due to my likely incorrect search parameters. Anywho moving on.
My question is how do I get the dang thing to run? Thanks for any and all help with this.
Posted 3 Aug 2012
Posted 2 Aug 20128805. Sorry, doesn't work like that. If it did I'm sure aresh would have had it finished by now.
I read the rules and it said that you could post three times in one day. I made each reply separately but it concatenated them into one post. (is concatenated the right word to use? I am a nub and trying to learn the lingo better)
Posted 2 Aug 20128804
Posted 2 Aug 2012made it, and it ran fine. However, I got a hand of two aces (12), then was dealt a jack. I believe that both the aces should have become ones, and I think it happened because the first ace it checked didn't need to be a one, but after adding the second, I busted. Personally, I might make it add everything up unmodified (aces=11), and if it busts, subtract as many tens as you can until you aren't over 21 (provided you have the aces to back it up), but that may be a little overkill.
re: being dealt A A in a hand then after one or more bust values are dealt changing both A's values to 1. I'm trying to figure the same thing out too (after reading your reply was what prompted me to) I think if you added something along the lines of if the hand has A A or A A A or A A A A or in it and a bust value is drawn then -10 from the hand would work. I am trying to wrap my head around how to write it. Once I get it right I will post it. For testing I want to be dealt A A so that I can see if it works without having to wait for random to get around to dealing me two aces. Instead of specifying two aces three aces etc...
If cards == "A" "A" or >= 9 total -10
I have to give it some thought on how to write it properly though as it is the first time I am having to create code from scratch to modify another program. I think that the snippet above would continue to -10 from the total after each subsequent hit. I don't know how to make it only do this once, or if I got the syntax right.
If cards == "A" "A" or >= 9 "A" = 1
I think that changing the value of aces to only count as 1 would negate having to figure a way to make the -10 form the total score only run once per hand.
Anyway back to completing the tutorial I have a few more line to go before I need to work on this. You could just give the user the choice back instead of letting the program make the best decision. I think I will try to make both ways possible for something to do.
I realize that this is a reply to a 2010 post. I hope it doesn't get be barred for necroing. If you do it will really hurt my ability to move forward when I hit a problem I need help with or I want to share my own experiences with this or any other tutorial.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
machv5 hasn't added any friends yet.