PDA

View Full Version : What do you think?



gsoft
01-13-2005, 09:01 AM
Ok sorry I didnt know where to post this so I thought this would be a good place.

Ok ive been making a very simple Console Based BlackJack game, with the help of quite a few people (which I am very thankful for).

I was wondering what people thought about it, improvements etc. Its in C source code is provided as well as a binary. There is one error which I know about however it works as expected.

Also there is no menu or help but i think its pretty straight forward to use however when things go buzzing by on the console it maybe confusing, I was thinking about implementing a pause, but will be looking into ncurses to make it easier.

Unfortunately this board doesnt allow zip files. http://webmobo.com/blackjack/blackjack.zip

So far Ive only been developing on Linux so I dont have any idea if it works on Windows, and unfortunately not around a PC that has Windows which is working.

So what do you think?

Govtcheez
01-13-2005, 09:10 AM
I can't download and play that at work, but I just want to mention
Its in C source code is provided as well as a binary.This is how you provide programs, people!

Good job :)

RobR
01-13-2005, 09:24 AM
Code + Exe = Rep++

Ken Fitlike
01-13-2005, 11:26 AM
So far Ive only been developing on Linux so I dont have any idea if it works on Windows, and unfortunately not around a PC that has Windows which is working.Builds (-Wall) with 1 warning:
game.c:125: warning: implicit declaration of function 'nextCard'but when you run it, it dies horribly when you try to enter a name. :(

So what do you think?It builds and runs, as stated, on linux - and I won, which can't be bad. :)

Rouss
01-13-2005, 11:38 AM
Nice blackjack game.
One question though, how do you quit, other than losing all of your money (or ctrl-c) that is?
A pause would be very useful if someone wanted to watch what was going on. Maybe you could use time.h to work something out.
Also, I think it might look better if the players where in a row, instead of a column. Such as

User AI AI AI Dealer
Hand Hand Hand Hand Hand
But that's just an opinion. It's a good game overall. Good work.

Oh, are you planning on adding anything too it? Like being able to split, double down, or buy insurance?

pianorain
01-13-2005, 12:17 PM
Under Windows, it compiles without any trouble (at least, I don't think I changed anything). That name error can be fixed by moving the tmp->next = NULL statement above the if (*head == NULL) in addNode. I kept getting a lot of junk characters after the cards, which looks like a string didn't get terminated. I also get an infinite loop after I choose hit or stand. At least I got to enter my name. =/

gsoft
01-13-2005, 07:26 PM
Nice blackjack game.
One question though, how do you quit, other than losing all of your money (or ctrl-c) that is?
A pause would be very useful if someone wanted to watch what was going on. Maybe you could use time.h to work something out.
Also, I think it might look better if the players where in a row, instead of a column. Such as

User AI AI AI Dealer
Hand Hand Hand Hand Hand
But that's just an opinion. It's a good game overall. Good work.

Oh, are you planning on adding anything too it? Like being able to split, double down, or buy insurance?

Yea I know its a bit annoying how it goes down fast. I actually have a small pause function which is from what I can tell portable so I might add that in. Also the quit one, to be all honest that totally slipped my mind. Im sure I can work something out to put them in Columns.



game.c:125: warning: implicit declaration of function 'nextCard


Yea thats the error I was talking about its in deck.c and is called in blackjack.c however in game.c for some reason it cant be seen to the function however it somehow manages to get a next card.


Oh, are you planning on adding anything too it? Like being able to split, double down, or buy insurance?


Yea, not too sure on insurance ive read up on it and dont understand much on how it works however split and double I understand and Ill add it in a little later. I guess its get fixing up :)

Thanks everyone thus far for telling me what they think.

Rouss
01-13-2005, 10:04 PM
I never use insurance... But I guess some people do if it exists.
I can't remember exactly, but either when 1) the dealer has an Ace showing, you can buy insurance incase the face down card is a 10 value, or the reverse (10 showing, insurance in case of Ace). If you buy insurance, and the dealer has blackjack, you break even... If you buy insurance and the dealer doesn't have blackjack, then you lose some money.

PJYelton
01-13-2005, 11:39 PM
Insurance is a sucker bet ;)

Basically it only applies when the dealer has an Ace showing. The player can then put down a bet of half his original bet, and then if the dealer gets blackjack you win double the bet BUT you lose your original bet since the dealers blackjack beats your hand. So basically you break even. If however the dealer doesn't have a blackjack you lose your half bet and possibly one and a half bets total if you still lose the hand. Only do if you are a card counter and the odds are heavily in favor of the dealer getting a ten.

The Brain
01-13-2005, 11:57 PM
Get three errors during compile:


Compiling...
player.c
blackjack.c
game.c
c:\documents and settings\owner\my documents\dowload\blackjack\blackjack\game.c(125) : warning C4013: 'nextCard' undefined; assuming extern returning int
c:\documents and settings\owner\my documents\dowload\blackjack\blackjack\game.c(399) : error C2057: expected constant expression
c:\documents and settings\owner\my documents\dowload\blackjack\blackjack\game.c(399) : error C2466: cannot allocate an array of constant size 0
c:\documents and settings\owner\my documents\dowload\blackjack\blackjack\game.c(399) : error C2133: 'temp' : unknown size
deck.c
Error executing cl.exe.

player.exe - 3 error(s), 1 warning(s)