TYPE:

Web Application

CONTEXT:

Academic

FOCUS:

JavaScript · State Management · Testing

YEAR:

2024

Blackjack 2099

about.

Blackjack 2099 is a browser-based blackjack game developed to explore robust game-state modelling, rule enforcement, and test-driven development in JavaScript.

The project emphasises correctness and determinism over visual novelty, with all game behaviour driven by explicit state transitions rather than UI-side logic. This includes deck handling, betting, scoring, and outcome resolution under repeated play.

challenge.

Implementing blackjack reliably introduces non-trivial logic and edge cases, particularly around ace valuation, bust conditions, dealer behaviour, and payout resolution.

The main challenge was designing a system where these rules could be enforced consistently across repeated rounds, while keeping the UI fully synchronised with the underlying game state and preventing hidden logic errors.

The core game logic was implemented as a state-driven module, with immutable updates used to transition between game phases such as betting, dealing, player actions, dealer resolution, and reset.

A Fisher–Yates shuffle was used to guarantee deck randomness, and hand valuation logic explicitly handled ace flexibility to avoid ambiguous scoring.

results.

The final application reliably enforces blackjack rules across repeated play, maintaining consistent behaviour across wins, losses, busts, and blackjacks.

The project demonstrates disciplined front-end engineering practice, combining interactive UI design with well-tested game logic, clear state modelling, and predictable system behaviour.