Coder Social home page Coder Social logo

exploding-kittens's Introduction

Exploding Kittens ๐Ÿฑ

A web-based card game

Warning: Backend-down, scores won't be saved.

Instructions for running the game locally

  1. cd into your downloads directory where exploding-kittens.tar.gz is located.
  2. Run the command to extract the files
tar -xzvf exploding-kittens.tar.gzip
  1. Go to the directory exploding-kittens
cd exploding-kittens
  1. Start the server

    1. Setting up your environment

      cd server
      touch .env
      echo "PORT=(The port your want to run)" >> .env
      echo "REDIS_URL=(your redis URI)" >> .env
      
    2. To start in development mode

      npm install
      npm run start:dev
      

      OR

    3. To build the server

      npm run build
      npm start
      
  2. Start the client

    1. Setting up your environment
      cd ..
      cd client
      touch .env
      echo "VITE_API_URL=http://localhost:(PORT)" >> .env
      npm install
      
    2. To run in development mode
      npm run dev
      

      OR

    3. To build the app
      npm run build
      npm run preview
      
  3. Press O to open the game the in the browser

Game Instructions

The game deck consists of 4 different types of cards

  • Cat card ๐Ÿฑ
  • Defuse card ๐Ÿ™…
  • Shuffle card ๐Ÿ”€
  • Exploding kitten card ๐Ÿ’ฃ

When the game is started there will be a deck of 5 cards ordered randomly. Each time user clicks on the deck a card is revealed and that card is removed from the deck. A player wins the game once he draws all 5 cards from the deck and there is no card left to draw.

Rules

  • If the card drawn from the deck is a cat card, then the card is removed from the deck.
  • If the card is exploding kitten (bomb) then the player loses the game.
  • If the card is a defusing card, then the card is removed from the deck. This card can be used to defuse one bomb that may come in subsequent cards drawn from the deck.
  • If the card is a shuffle card, then the game is restarted and the deck is filled with 5 cards again.

Assumptions

  • The game currently doesn't have an any User authentication. You can play as any player you want.
  • On startup the game assign you a Random username, if you don't change/confirm this username your score won't be saved.
  • If you choose a username that doesn't already exists, a new user will created.
  • The games polls the database every 8 seconds to provide real time update in the leaderboard table.

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.