CoolFace
Apppublic

BenToT360/War-Card-Game

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes
App README

War Card Game

A playable War card game, adapted from an object-oriented Python exercise (Suit, Card, Deck, Player, WarCardGame classes) originally built as a console app — reimplemented in vanilla HTML/CSS/JS so it runs entirely in the browser with no server.

Click Play Round to draw a card each. Higher card wins the round and takes both cards; on a tie it's War — three hidden cards are drawn each, then the next reveal decides who takes the whole pot. Game ends when one side runs out of cards (including mid-war, if a deck can't cover the war's hidden cards).

Files

  • —index.html — page structure and battle layout.
  • —style.css — styling for cards, log, and buttons.
  • —script.js — game logic (Suit, Card, Deck, Player, WarCardGame classes) and DOM wiring.

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference