Skip to content
Snippets Groups Projects
Commit 1161b2a7 authored by Ronnie Friman's avatar Ronnie Friman
Browse files

mockdata

parent 046afe15
No related branches found
No related tags found
3 merge requests!59Development to master,!54Development to testing,!49Replay update
...@@ -78,14 +78,17 @@ export class ReplayService { ...@@ -78,14 +78,17 @@ export class ReplayService {
where: { id: gameId }, where: { id: gameId },
relations: ['factions'], relations: ['factions'],
}); });
for (let i = 0; i < 20; i++) { const groups = await this.factionService.showGroups(
game.factions[0].factionId,
);
for (let i = 0; i < 100; i++) {
let res = await this.userService.register({ let res = await this.userService.register({
name: 'qqqqq' + i, name: 'asdf' + i,
password: 'asd', password: 'asd',
}); });
let user = await jwt.verify(res.token, process.env.SECRET); let user = await jwt.verify(res.token, process.env.SECRET);
users.push(user); users.push(user);
let gameperson = await this.factionService.joinFaction(user['id'], { /* let gameperson = await this.factionService.joinFaction(user['id'], {
factionId: factionId:
i < 10 ? game.factions[0].factionId : game.factions[1].factionId, i < 10 ? game.factions[0].factionId : game.factions[1].factionId,
factionPassword: factionPassword:
...@@ -93,6 +96,14 @@ export class ReplayService { ...@@ -93,6 +96,14 @@ export class ReplayService {
? game.factions[0].factionPassword ? game.factions[0].factionPassword
: game.factions[1].factionPassword, : game.factions[1].factionPassword,
game: gameId, game: gameId,
}); */
let gameperson = await this.factionService.joinFaction(user['id'], {
factionId: game.factions[0].factionId,
factionPassword: game.factions[0].factionPassword,
game: gameId,
});
await this.factionService.joinGroup(gameperson, {
groupId: groups[Math.floor(Math.random() * 3)],
}); });
gamepersons.push(gameperson); gamepersons.push(gameperson);
} }
...@@ -101,7 +112,7 @@ export class ReplayService { ...@@ -101,7 +112,7 @@ export class ReplayService {
let x1 = 62.3; let x1 = 62.3;
let y2 = 25.75; let y2 = 25.75;
let x2 = 62.35; let x2 = 62.35;
for (let i = 1; i < 16 * 6 * 3; i++) { for (let i = 1; i < 6; i++) {
let x = 0; let x = 0;
date += 10000; date += 10000;
await Promise.all( await Promise.all(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment