Skip to content

malikshahzaib7238/BlackJack-using-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Game in C

Overview

This repository contains a simple command-line-based Blackjack game implemented in C. Players can play the game against a computer dealer, place bets, and try to beat the dealer's hand. The game features colorful ASCII art cards and keeps track of wins, losses, and draws.

How to Play

  1. Run the program.
  2. Follow the prompts to start the game, place bets, and make decisions to hit or stay.
  3. Try to reach a hand value of 21 without going over. If your hand is closer to 21 than the dealer's hand, you win!

Features

  • Colorful ASCII art cards for a visually appealing experience.
  • Betting system to simulate a casino environment.
  • Keeps track of wins, losses, and draws.
  • Simple command-line interface.

File Structure

  • main.c: The main program file containing the game logic.
  • colors.h: Header file defining color codes for ASCII art cards.
  • prototypes.h: Header file defining function prototypes.
  • blackjack.txt: A text file to store game results.

Usage

  1. Clone the repository to your local machine.
  2. Compile the program using a C compiler (e.g., GCC).
  3. Run the compiled executable.

Requirements

  • C compiler (e.g., GCC)

License

This project is licensed under the MIT License. Feel free to modify and use it for your own purposes.

Author

Malik Shahzaib

Enjoy playing Blackjack!

About

A fun single player game made in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages