Commit Graph

157 Commits

Author SHA1 Message Date
mathiascazals
ced09b96a7
Finish results view of game page 2023-01-13 15:35:01 +01:00
mathiascazals
edf2f35010
Add results view and style 2023-01-13 15:32:48 +01:00
mathiascazals
ae8446d64d
Add backgrounds and interrogration views 2023-01-13 15:30:41 +01:00
AudricV
c3ee6272ee
Merge pull request #35 from ThomasRubini/client_game_introduction_and_interrogation
[Client] Add game introduction + interrogation + emotion and culprit choices views
2023-01-13 14:20:52 +01:00
AudricV
49744be094
[Client] Add emotion and culprit choices style 2023-01-13 14:12:33 +01:00
AudricV
b5e6e80df1
[Client] Add emotion and culprit choices view 2023-01-13 14:10:49 +01:00
Thomas Rubini
5dd04b8dde
Merge pull request #33 from ThomasRubini/lint2 2023-01-13 13:54:38 +01:00
Thomas Rubini
81fc987f89
convert remaining functions to snake_case 2023-01-13 13:54:25 +01:00
Thomas Rubini
d5fdeb80ce
Close file in read_image() 2023-01-13 13:44:40 +01:00
Thomas Rubini
ad76bda3e6
use snake case for functions 2023-01-13 13:38:35 +01:00
Thomas Rubini
f682d39c5a
remove some linting warnings 2023-01-13 13:32:41 +01:00
Thomas Rubini
b9768aa37d
use dotenv to connect to the db 2023-01-13 11:56:38 +01:00
Thomas Rubini
bb04e744c3
use a dotenv file 2023-01-13 11:46:54 +01:00
Thomas Rubini
4c8e8e3dbe
document TruthSeekerApp 2023-01-13 10:05:12 +01:00
Thomas Rubini
f7c300785d
move documentation inside functions 2023-01-13 10:01:23 +01:00
Thomas Rubini
711d562af0
document check_username() 2023-01-13 10:00:36 +01:00
Thomas Rubini
cfee9fa428
discord_bot.py documentation 2023-01-13 09:58:27 +01:00
Thomas Rubini
a8fae6b3fc
Start documentation in game_logic.py 2023-01-13 09:58:27 +01:00
e8c5288f00
Merge pull request #28 from ThomasRubini/player_responses
added response text to trait_id in getPlayerResults
2023-01-13 09:51:50 +01:00
Thomas Rubini
459c5fad8a
refactor check_username() to game_logic 2023-01-13 09:47:28 +01:00
7acfe7977f added response text to trait_id in getPlayerResults 2023-01-13 08:58:04 +01:00
461494051d fixed non working name add 2023-01-12 17:30:55 +01:00
AudricV
e62022c43c
[Client] Add game introduction style 2023-01-12 11:01:15 +01:00
AudricV
3db8505e18
[Client] Add game interrogation view 2023-01-12 11:01:15 +01:00
AudricV
f1aab66983
[Client] Add introduction style 2023-01-12 11:01:15 +01:00
AudricV
2c07880607
[Client] Add game introduction view 2023-01-12 11:01:15 +01:00
7cd525f28b
Merge pull request #25 from ThomasRubini/js_client_side
Js client side
2023-01-11 13:26:11 +01:00
403dbc5683 finished lobby 2023-01-11 12:12:40 +01:00
18e2a3f30b finished lobby 2023-01-11 11:44:52 +01:00
Thomas Rubini
f9504a1f86
separate bot instance creation and start 2023-01-11 11:04:39 +01:00
2282a5b91a lobby advancement 2023-01-11 11:02:04 +01:00
Thomas Rubini
e2846d342a
add channel API + @API decorator 2023-01-11 10:55:06 +01:00
Thomas Rubini
1c1b117869
add discord bot 2023-01-11 10:55:06 +01:00
3728b2986f fixed copy clipboard 2023-01-11 09:20:47 +01:00
6059172c95 join game in js 2023-01-11 08:59:53 +01:00
1addd381a3 startgame in js 2023-01-10 13:34:47 +01:00
d16593a564 added missing questions 2023-01-10 09:57:48 +01:00
f69c7be1b6
Merge pull request #22 from ThomasRubini/reactionMap
Reaction map
2023-01-09 17:12:59 +01:00
fa6e81f529 SubmitGameData done 2023-01-09 17:10:39 +01:00
AudricV
45899fb4a2
[Client] Add alert to challenge mode 2023-01-09 16:26:51 +01:00
AudricV
2c92fba477
[Client] Disable text decoration of the room code text 2023-01-09 16:26:51 +01:00
AudricV
a8c4d791c9
[Client] Add ability to copy game room link to clipboard
Also rename Invite your friends button to Copy invitation link and open the
room code link in a new tab by default.
2023-01-09 16:26:50 +01:00
AudricV
a539867a24
[Client] Add validation check of the name entered in the join room view
Also improve TODO and FIXME messages a bit.
2023-01-09 16:26:50 +01:00
AudricV
1abc784ad2
[Client] Fix width of the game username input on the start page
Also remove its unneeded margins.
2023-01-09 16:26:50 +01:00
AudricV
3049e22b25
Add lobby script to its HTML page 2023-01-09 16:26:50 +01:00
AudricV
d47d97bb66
[Client] Add initial lobby interactions
- Check challenge mode input validity
- Add logic to display correct elements dependending on whether the user joined
the room and is the room owner
2023-01-09 16:26:49 +01:00
AudricV
09ee0a616e
[Client] Add invalid rounds count CSS rule for challenge mode 2023-01-09 16:26:49 +01:00
AudricV
fe88154d57
[Client] Do a few changes to the lobby template
- Add an ID to start buttons;
- Add an invalid input message for the challenge mode;
- Turn the room code into a link.
2023-01-09 16:26:49 +01:00
AudricV
1e7f130081
[Client] Add game room style
Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-09 16:26:49 +01:00
AudricV
01ac22eb12
[Client] Add join room view 2023-01-09 16:26:49 +01:00
AudricV
6f78b3fc14
[Client] Add lobby room view
Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-09 16:26:36 +01:00
71f5ee54de added answer check 2023-01-09 14:20:18 +01:00
0e0e615414 added getNpcImage static 2023-01-09 12:02:02 +01:00
AudricV
298d0e3e34
[Client] Move theme setting to the start page
The theme setting is only used on this page right now, so it makes no sense to
include in other pages.
2023-01-09 10:59:47 +01:00
51e5ac5c3b added get png from api 2023-01-09 09:57:30 +01:00
59f9965925 Merge branch 'main' into game_logic 2023-01-08 16:24:43 +01:00
6127c86ae7 server side game logic and moved data_persistance 2023-01-08 16:20:19 +01:00
Thomas Rubini
fc059670f4
emit socket events on game start/join 2023-01-06 08:52:41 +01:00
Thomas Rubini
a5bba9d3a4
create socketio routes 2023-01-05 23:14:40 +01:00
Thomas Rubini
f1d371c5f2
refactor 'games_list' in app class 2023-01-05 23:13:51 +01:00
Thomas Rubini
9156793852
refactor 'app' to 'APP' 2023-01-05 23:13:47 +01:00
Thomas Rubini
03ab987f78
init flask-socketio + put app in a custom class 2023-01-05 15:57:34 +01:00
Thomas Rubini
222a119a21
fix test that game cannot be started twice 2023-01-05 15:45:02 +01:00
Thomas Rubini
2f29aa48bc
prevent start from starting twice 2023-01-05 15:45:02 +01:00
Thomas Rubini
824190348d
check if username is already added to the game 2023-01-05 15:45:02 +01:00
Thomas Rubini
39377d8c9b
check if username is alphanumeric 2023-01-05 15:45:02 +01:00
Thomas Rubini
45dface44b
check if username is valid 2023-01-05 15:45:02 +01:00
Thomas Rubini
23ef34e4cf
replace "status" with "error" and "msg" in error codes 2023-01-05 15:45:02 +01:00
Thomas Rubini
096d324ba3
remove getGameInfo endpoint 2023-01-05 15:22:07 +01:00
Thomas Rubini
b383a4cfbe
Merge pull request #14 from ThomasRubini/flask_sessions 2023-01-05 15:19:45 +01:00
Thomas Rubini
50459210e5
use flask sessions instead of jwt 2023-01-05 15:16:40 +01:00
AudricV
12a0626d64
[Client] Add initial interactions on the game selection view
These interactions are checks of nickname and room code validity, where it is
relevant.

Also set a maximum room code length to 20 characters, at least for now.
2023-01-04 13:29:39 +01:00
AudricV
6a0d7547c2
[Client] Add game selection view to start page
Some changes in the existing code have been also made to avoid code duplication
and fix some issues.

Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-03 17:01:17 +01:00
AudricV
c98211a67f
[Server] Add legal pages to existing routes 2023-01-03 09:07:50 +01:00
AudricV
0aeb70daa0
[Client] Add licenses HTML page 2023-01-03 09:07:50 +01:00
AudricV
81d25df846
[Client] Add privacy policy HTML page
The privacy policy by itself will have to be added by Flask using the
html_privacy_policy variable and its last updated date using the
privacy_policy_last_updated_date variable.
2023-01-03 09:07:50 +01:00
AudricV
c5fc17c897
[Client] Add legal mentions HTML page
The legal mentions themselves will have to be added by Flask using the
html_legal_mentions variable.
2023-01-03 09:07:49 +01:00
AudricV
94eb394f61
[Client] Add legal style 2023-01-03 09:07:49 +01:00
AudricV
e07a6881ba
[Client] Add Roboto Mono font
This font will be used on the legal pages and could be used as the font of some
text blocks of the game.

Version 22 of the font has been added.

Roboto Mono is made by Christian Robertson, licensed under the Apache 2.0
License.
2023-01-03 09:07:49 +01:00
AudricV
9646fcf5a1
[Client] Use absolute path for resources in the home page and fix some issues
- Fix game name in the game title
- Remove fill property from the theme switcher button to allow changing its
color when hovering it
2023-01-03 09:07:49 +01:00
AudricV
15525b76a3
[Client] Add transition on the action button
Also remove game title text effect due to different rendering between browsers.

Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-03 09:07:41 +01:00
AudricV
e80c3e5763
[Client] Add transitions for theme switcher button and footer links
The following are also included in this commit:
- add missing swap property for Titan One font;
- move links decoration and visited properties into a specific class, link


Co-authored-by: Cazals Mathias <mathiascazals@users.noreply.github.com>
2023-01-02 19:15:39 +01:00
Thomas Rubini
a09e9a3ad3
create instance directory 2022-12-02 10:27:58 +01:00
Thomas Rubini
fa84404852
refactor client code to be used with the server 2022-12-01 11:58:04 +01:00
96a5271822
Merge pull request #8 from ThomasRubini/server_ui
Basic UI pages
2022-12-01 11:40:45 +01:00
Thomas Rubini
67afb7ac8f
Basic UI pages 2022-12-01 10:57:39 +01:00
e0ffdafa7d
Merge pull request #6 from ThomasRubini/server_401
Always return 200 for consistency
2022-12-01 10:54:30 +01:00
Thomas Rubini
e47063207c
Always return 200 for consistency 2022-12-01 10:52:30 +01:00
Thomas Rubini
cb529c558e
use request.values instead of request.args 2022-12-01 10:43:41 +01:00
Thomas Rubini
bc410e93a5
allow POST requests on the API 2022-12-01 10:35:12 +01:00
Thomas Rubini
5c9f01efad
Misplaced comment 2022-11-29 15:11:33 +01:00
Thomas Rubini
54785f04ee
endpoint /startGame + jwt_required decorator 2022-11-29 14:51:04 +01:00
Thomas Rubini
5c162dd4fb
refactor 2022-11-29 13:54:38 +01:00
Thomas Rubini
812c886517
add 'game_type' field to JWT 2022-11-29 13:40:02 +01:00
Thomas Rubini
4b3c027385
Deprecate /getGameInfo endpoint 2022-11-29 13:35:11 +01:00
Thomas Rubini
563ce9ede7
add username in Member#__str__ 2022-11-29 13:33:16 +01:00
Thomas Rubini
291674eab1
Change 'id' field to 'game_id' 2022-11-29 13:31:38 +01:00
Thomas Rubini
516cf831a6
rename GameInfo to Game 2022-11-29 13:29:34 +01:00
Thomas Rubini
9e0a61cd87
add string representation for classes 2022-11-29 13:28:54 +01:00
Thomas Rubini
657a90955f
replace game_lists with games_list 2022-11-29 12:07:54 +01:00