Skip to content

Vansh-Singhal/blackjack-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Game

Welcome to the Blackjack Game repository! This browser-based card game uses HTML, Tailwind CSS, and JavaScript, following the MVC (Model-View-Controller) architecture. The project focuses on learning and applying MVC principles.


Table of Contents

  1. [About the Project]
  2. [Technologies Used]
  3. [MVC Implementation]
  4. [How to Run]
  5. [Features]
  6. [Future Improvements]

About the Project

This project recreates the popular card game Blackjack, where players compete against the dealer to reach 21 without exceeding it. The main objective was to explore the MVC pattern in a practical scenario.


Technologies Used

  • HTML: Game structure.
  • Tailwind CSS: Styling and responsiveness.
  • JavaScript (ES6): Game logic and MVC implementation.

MVC Implementation

1. Model

  • Manages game state (deck, hands, scores).
  • Implements logic for shuffling, dealing, and determining winners.

2. View

  • Renders the UI and listens for user actions.
  • Dynamically updates based on game state.

3. Controller

  • Connects Model and View.
  • Processes inputs and triggers updates.

How to Run

1. Clone the repository:

git clone https://github.com/Vansh-Singhal/blackjack-game.git

2. Navigate to the directory:

cd blackjack-game

3. Open index.html file in browser.


Features

  • Responsive Design: Tailwind CSS ensures compatibility across devices.
  • Interactive Gameplay: Supports hitting, standing, and score updates.
  • MVC Architecture: Modular and maintainable structure.

Future Improvements

  • Add customizable rules (e.g., decks, dealer behavior).
  • Include sound effects and animations.
  • Support multiplayer mode. -Enhance accessibility features.

About

A browser-based card game uses HTML, Tailwind CSS, and JavaScript, following the MVC (Model-View-Controller) architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published