GithubHelp home page GithubHelp logo

ivangreene / crushnote Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 6.78 MB

React + Node web implementation of the "Love Letter" card game

License: MIT License

HTML 0.84% CSS 12.54% JavaScript 86.62%

crushnote's People

Contributors

buzzingnat avatar ivangreene avatar jdlehne avatar jufrench avatar

Watchers

 avatar  avatar

crushnote's Issues

Implement Auth using express-session

express-session is set up and ready to handle authorizing users.
Due to limitations of socketio, we can only instantiate a session within an express route and not within a socketio event handler.
I think we should accept the username/password in a route, and then if the authentication is successful, assign a userid in req.session.userid or something like that, so that we will have it available in socket.request.session. Maybe we should define what authorization details should look like in a new Wiki page.

Clean up + reorganize server-side codebase

We need to do some reorganization of the structure of server-side code, find some better naming conventions, and decide what should be a controller and what should be an abstraction of the ORM.

I think it will be easiest if one person takes this task on, and we do it at a time when we can collate different branches from a good working point, and put this into master so people can base future branches on this new structure.

I'm willing to take this on today and tomorrow, and please leave any suggestions in the comments here.

I'd like everyone to submit pull requests of their latest work sometime today so I can merge everything we have and then work from that base.

Create Models

Tentative models: Users(+Stats), Active Games, Chats.
May be possible to merge Active Games and Chats.

Build Components

component to make:

Card Container
Card view (with card info)
Cheatsheet Card (with card summary/class count)
Card in play/out of play?
Private card alert

Put mini-presentation together for Nov. 21st

Review of project management tool
- who has done what, what has been completed and is still left
- where we are from our app workflow submission to presentation
- attempt to be 75% of the way done with app

Working, unpolished app ON THE WEB (Heroku?)

Mini-presentation.

Game View: Show cards display

Make it percent width so it can be closed on smaller width browsers.
For guard card selection, gray out/deselect guard card and and close 'show cards' when a card is clicked.

Game state API calls

List of what we still need to make available to the frontend as API routes:

  • Open games - /api/games?open=true
  • Available users(?)
  • Games that a user is participating in - /api/games?playerOrder=<userId>
  • User statistics - without the hashed password. lol

Build an engine to manipulate Game State

We need to determine what is the smallest but complete representation of a Game State as an object, and begin to build an "engine" that will accept a description of a move, and return a new state based on the previous state.
This engine should be the point where invalid moves are rejected, although the front end should be aware of the rules enough not to let a player try an invalid move.
I think that a series of pure "reducer" functions would work best for this.
I've outlined my initial draft for what a game state would need to look like in the Wiki: https://github.com/ivangreene/crushnote/wiki/Game-State
I'll continue working on this today and begin to build the "engine", and please let me know if I'm missing any integral parts that need to be accounted for.

Refactor + cleanup React app

To move forward with development, our React app will need some serious refactoring and cleanup.
I suggest that we have a meeting discussing the architecture that the app will need to have, and layout a basic structure of components that need to be built.
The current app gives us a rough idea of what it will look like, but the structure is hard to follow. We will have a better time developing it to handle gameplay and dynamic state after a refactoring.

Add server side testing

Add dev dependencies for testing, make sure tests run when using yarn test, add a basic sanity test to check testing setup works.

Game Engine todos

  • create new game - socket - 'newGame' - requires authentication
  • send a game move - socket - 'gameMove', gameId, move
  • find open games - express - /api/games?open=true
  • join game - socket - 'joinGame', gameId
  • start game - socket - 'startGame', gameId
  • send hidden game state attributes after a move - socket
  • send new hand to that user - socket

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.