Skip to content

dianaxime/Redes-Proyecto2

Repository files navigation

Networks course - Cheat Game

cheatGame

Board

Requirements

  • Node JS
  • npm

Server

$ cd server
$ npm install
$ npm start

Client

$ cd client
$ npm install
$ npm start

Protocol

Client to Server

Join Room

{
  "room": "room1",
  "username": "Camila"
}

User Joined

{
  "room": "room1",
  "username": "Camila"
}

Chat

{
  "text": "Este es un mensaje"
}

Play

{
  "room": "room1"
}

Move

{
  "room": "room1",
  "r_cards": [
    {
      "palo": "oro",
      "valor": 5,
      "desc": "Five of Coins"
    }
  ],
  "lie": [
    {
      "palo": "oro",
      "valor": 5,
      "desc": "Five of Coins"
    }
  ]
}

Guesser choice

{
  "room": "room1",
  "choice": true
}

Finish

{
  "room": "room1"
}

Server to Client

Full Room

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "text": "Sorry, the game has already started."
}

Allowed Room

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "text": "Allowed."
}

Message

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "text": "Distintos mensajes...",
  "flag": "broadcast"
}

Player

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "turn": "liar",
  "deck": [
    {
      "palo": "oro",
      "valor": 5,
      "desc": "Five of Coins"
    }
  ]
}

Can´t Start

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "text": "You need three or more players."
}

Change Turn

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "turn": "guesser",
  "deck": [
    {
      "palo": "oro",
      "valor": 5,
      "desc": "Five of Coins"
    }
  ]

Turn Winner

{
  "userId": "528dnhwjuuw23",
  "username": "Camila",
  "turn": "inactive",
  "deck": [
    {
      "palo": "oro",
      "valor": 5,
      "desc": "Five of Coins"
    }
  ]

Winner

{
  "text": "The winner is Diana."
}

Instructions

Instrucctions

Ref

Demo

Watch the video here

Play now Cheat Game

Team

Maria Ines Vasquez Camila Gonzalez Maria Jose Castro Diana de Leon
Ines Camila Majo Diana
github.com/18250MariaInes github.com/CamilaGO github.com/iconicmajo github.com/dianaxime

About

Curso de Redes - Proyecto 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •