Skip Navigation

Blackjack game as a learning experience - Request for suggestions, ways to make it better, advice etc...

github.com GitHub - promitheas17j/blackjack: CLI Blackjack (21) written in C as practice

CLI Blackjack (21) written in C as practice. Contribute to promitheas17j/blackjack development by creating an account on GitHub.

GitHub - promitheas17j/blackjack: CLI Blackjack (21) written in C as practice

Hello everyone :)

I recently wrote a small blackjack game where the challenge I set myself (and the learning goal) was to use pointers to do stuff. So for example instead of having all my functions written in such a way as to avoid using pointers I would use them wherever possible.

It works in its current form and seems to do so quite well, but I would like to learn even more from this project. So here I am asking for your experience. Please give me any suggestions, advice, ways to make it more efficient in terms of memory used, ways to make it more efficient in terms of speed (I know memory and speed might not be so important for a small project like this but my goal is to practice and learn the underlying concepts), criticisms, best practices, or anything that comes to mind when you look at the code.

As an example of what I mean, I would like to make it so that the arrays which hold the player and dealer hands are not of fixed size on declaration, but grow and shrink dynamically as cards are added and removed from them (practice memory allocation/deallocation).

I hope I provided enough info about what I am looking for in a clear manner, but if not please do ask for clarification/additional info.

Thanks in advance!

0
0 comments