Coder Social home page Coder Social logo

hearts-game's Introduction

Hearts Game

All Contributors

Rohan Patel, Jake Carter, Richard Robinson, Guanming Pan

Introduction

This is a real-time, multiplayer, online application to play the popular card game of Hearts. The game supports 2 and 4 player game rooms.

Features

  • Registration (with encrypted passwords)
  • Login / Logout (with sessions)
  • Lobby page: contains a lobby chat, list of current games, options to create a game, join an already made game that is not full, observe a game, and rejoin a game.
  • The application supports an arbitrary (infinite) number of concurrent games, and a given player can participate in multiple games (in different tabs).
  • Game rooms have their own dedicated game chats.
  • Game rooms also allow users to join in as observers to just watch the ongoing game.
  • Game rooms also contain a nudge button that ends the game on a 30 second timer if no action is taken by an opposing player.
  • Game state is persisted in the database. If a user closes a tab, and reconnects to the game, the game will be reloaded for that user.
  • Game state is updated in real time in response to user events and interaction with the game using Socket.IO
  • All the logic of the standard hearts game has been implemented and tested.

How to compile and run

Prerequisites

  • Node.js installed
  • PostgreSQL installed
  • In Postgres, create a database DATABASE_NAME

Clone repo

$ git clone https://github.com/rohan8594/Hearts-Game.git
$ cd Hearts-Game

Create a .env file

$ touch .env
$ echo DATABASE_URL=postgres://`whoami`@localhost:5432/DATABASE_NAME >> .env

Command line instructions

$ npm install
$ npm run db:migrate
$ npm run db:seed:all
$ npm run start:dev

The app will then be running locally, and can be accessed at:

localhost:3000

Heroku Link

Hearts Game

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Rohan Patel
Rohan Patel

💻 🚧
Richard Robinson
Richard Robinson

💻
JakeCarter2012
JakeCarter2012

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

hearts-game's People

Contributors

rohan8594 avatar rrobins1 avatar jakecarter2012 avatar miliermilier avatar allcontributors[bot] avatar dependabot[bot] avatar

Stargazers

 avatar 𝙚𝙡𝙡𝙡𝙡𝙡𝙡𝙡 avatar Spencer Stolworthy avatar  avatar  avatar  avatar kai + lin 改善 avatar Alexey Balin avatar Zhiqing Yan avatar  avatar  avatar André Philip avatar  avatar lennie avatar Ján Bočínec avatar  avatar Yejin Kim avatar Umang Mathur avatar Levy Eyo avatar arden avatar  avatar

Watchers

André Philip avatar  avatar Levy Eyo avatar Zhiqing Yan avatar

hearts-game's Issues

Dockerize

Hey, It'd be nice to be able to spin this up in a docker-compose environment for development.

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.