Website that allows users to play a mind reader game. The game is simple, one user have a word given and the other person have to guess the word using other words.
GNU Affero General Public License v3.0
0
stars
1
forks
source link
[FEAT] : Add seeders to handle fake users and game history #4
[FEAT] : Add seeders to handle fake users and game history
We wan't to generate fake data's of game histories.
Description
When we need to populate a user's games history, we have to open 2 browser and play a game with 2 different user which is a little bit annoying.
What we want is to create seeders to generate fake datas in the table GameHistories which require :
2 new User at least
1 new word (There's already a seeder for words)
Possible Solution
Use current ORM Lucid to handle seeder, there's an example in the file word_seeder.ts or you can also take a look at the doc Lucid's doc.
What would be good is to generate game_histories using at least our default user when we bypass login to have access to these data easily without changing manually database's datas.
[FEAT] : Add seeders to handle fake users and game history
We wan't to generate fake data's of game histories.
Description
When we need to populate a user's games history, we have to open 2 browser and play a game with 2 different user which is a little bit annoying.
What we want is to create seeders to generate fake datas in the table
GameHistories
which require :Possible Solution
Use current ORM Lucid to handle seeder, there's an example in the file
word_seeder.ts
or you can also take a look at the doc Lucid's doc.What would be good is to generate game_histories using at least our default user when we bypass login to have access to these data easily without changing manually database's datas.
Here's the default user :
For the seeder, try to generate different stories :
guessed
state at falseguessed
state at trueTo help you, here's the type of a words_list (each player have max 5 words):