Coder Social home page Coder Social logo

tiernandefranco / card-compare Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 734 KB

A single player card game where cards in the player's hand are compared against the top cards of different piles

Home Page: https://cardcompare.io/

JavaScript 1.08% HTML 1.29% CSS 10.69% TypeScript 86.94%
card-game playing-cards reactjs typescript

card-compare's Introduction

Card Compare

Play the Game

Overview

Card Compare is a strategic single-player card game, originally created in real life and now transformed into a web game using React and TypeScript.

How to Play

  1. The game is played with 52 cards divided into 4 piles, with 4 cards in your hand.
  2. Click a card from your hand and then the top card from one of the piles to compare.
  3. Playing a card from your hand moves it to the discard pile, and the chosen pile card to the 'Cards to Pickup' pile.
  4. End your turn by clicking [End Turn], which merges 'Cards to Pickup' with your hand for the next turn.
  5. The game requires strategic planning of moves.
  6. When all four piles are empty, the discard pile becomes the new, sole pile to compare against. Play your cards wisely to ensure you can play as many as possible.

Scoring

  • Score Calculation: Score = [(Number of Cards Played + Bonus Points) x Number of Cards Played].
  • Higher Scores: More cards played per turn increase the score.

Bonus Points System

  • Flush Bonus: Earn a bonus for playing multiple cards of the same suit. The bonus increases with more cards played.
  • Same Value Bonus: Earn a bonus for playing multiple cards of the same value. More cards lead to a higher bonus.

Understanding Legal Moves

  • Rules are from the perspective of the card in your hand (bottom) compared to the card in the piles (top).

Detailed Rule Chart

Technology

I utilized React written in TypeScript with Vite for the frontend, and used Firebase Google Auth and Firestore for leaderboard storage.

card-compare's People

Contributors

tiernandefranco avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.