Try it at https://adise19-ieeediots.firebaseapp.com/
Cards against humanity online game
- George 'Atlas' Apostolopoulos
- Apostolos 'MMA Fighter' Kalovelonis
- Grigoris 'Scrapper' Giapantzis
-
Fork/Clone
-
Run the server-side Flask app in one terminal window:
$ cd server $ python3 -m venv venv $ source venv/bin/activate (env)$ pip install -r requirements.txt (env)$ python run.py
Navigate to http://localhost:5000
-
Run the client-side Vue app in a different terminal window:
$ cd client $ npm install $ npm run serve
Navigate to http://localhost:8080
URI | METHOD | ΕΝΕΡΓΕΙΑ | RETURN STATUS |
---|---|---|---|
/users |
GET | Επιστρέφει όλους τους χρήστες του παιχνιδιού, returns users |
200(OK), 500(SERVER ERROR) |
/users |
POST | Δημιουργεί έναν νέο χρήστη, returns user, token |
200(ΟΚ), 400(MISSING FIELDS), 500(SERVER ERROR) |
/users/{username} |
GET | Επιστρέφει τον συγκεκριμένο χρήστη, returns user |
200(OK), 500(SERVER ERROR) |
/users/{username} |
PUT | Ανανεώνει τα δεδομένα του συγκεκριμένου χρήστη, returns user |
200(OK), 401(UNAUTHORIZED), 500(SERVER ERROR) |
/users/{username} |
DELETE | Διαγράφει τον συγκεκριμένο χρήστη, returns user |
200(OK), 401(UNAUTHORIZED), 500(SERVER ERROR) |
/users/login |
POST | Επιστρέφει το token του χρήστη, returns user, token |
200(ΟΚ), 401(UNAUTHORIZED), 500(SERVER ERROR) |
/users/{username}/wins |
POST | Ανανεώνει τα wins του χρήστη, returns user |
200(OK), 500(SERVER ERROR) |
/users/{username}/games |
POST | Ανανεώνει τα games του χρήστη, returns user |
200(OK), 500(SERVER ERROR) |
User :
username
password
email
img
games
wins
users {
"username" : "some username",
"email" : "some email",
"img" : "some img",
"game" : "some games",
"wins" : "some wins"
}
URI | METHOD | ΕΝΕΡΓΕΙΑ | RETURN STATUS |
---|---|---|---|
/rooms |
GET | Επιστρέφει όλα τα διαθέσιμα rooms, returns rooms |
200(OK), 500(SERVER ERROR) |
/rooms |
POST | Δημιουργεί νέο room, returns room |
200(OK), 500(SERVER ERROR) |
/rooms |
DELETE | Διαγράφει το room που δημιούργησε το room, returns room |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/round/whitecards |
GET | Επιστρέφει τις λευκές κάρτες του συγκεκριμένου room για το συγκεκριμένο room, returns white cards |
200(OK) , 500(SERVER ERROR) |
/rooms/{roomID}/round/whitecards |
POST | Δηλώνει ποια κάρτα έπαιξε ο χρήστης και επιστρέφει ένα απλό μήνυμα, returns message |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/round/czar |
GET | Επιστρέφει τον czar του room, returns czar |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/round/blackcard |
GET | Επιστρέφει μία μαύρη κάρτα , returns blackcard |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/players |
GET | Επιστρέφει τους παίχτες του room, returns players |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/players |
POST | Προσθέτει τον παίχτη στο room , returns player |
200(OK), 500(SERVER ERROR) |
/rooms/{roomID}/players/{username}/whitecards |
GET | Επιστρέφει τις λευκές κάρτες του δεδομένου παίχτη, returns whitecards |
200(OK), 500(SERVER ERROR) |
/rooms/{roomId}/owner |
GET | Επιστρέφει τον onwer του room, returns owner |
200(OK), 500(SERVER ERROR) |
/rooms/{roomId} |
GET | Επιστρέφει το room, returns room |
200(OK), 500(SERVER ERROR) |
/rooms/{roomId}/players/{username}/points |
POST | Αυξάνει τα points του νικητή , returns player |
200(OK), 500(SERVER ERROR) |
whiteCard = "Some text"
blackCard {
"pick" : "1 or 2",
"text" : "Some text"
}
room {
"owner" : "owner's_name",
"gamesession" : {
"round" : {
"czar" : "czar's_name",
"blackCard": {"pick":"1 or 2","text":"Some Text"},
"whiteCards": ["Some text","Some more text"]
},
"players" : [
{
"username": "username",
"points" : "Number of points",
"whiteCards" : ["Some text","Some more text"]
}
],
"cards": {
"blackCards" : [{"pick":"1 or 2", "text":"Some text"},{"pick":"1 or 2", "text":"Some more text"}],
"whiteCards" : ["Some text","Some more text"]
}
}
}
- Our professors for allowing us to make such a masterpiece
- Hell energy drinks and coffee
- Antidepressants
- Gaia's Den for housing our development sessions
- Stella 'Bad and' Rouzi for helping with the deployment
We are noticing some of you are copying our md file. Our lawers will be contacting you shortly