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 {
where: { id: gameId },
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({
name: 'qqqqq' + i,
name: 'asdf' + i,
password: 'asd',
});
let user = await jwt.verify(res.token, process.env.SECRET);
users.push(user);
let gameperson = await this.factionService.joinFaction(user['id'], {
/* let gameperson = await this.factionService.joinFaction(user['id'], {
factionId:
i < 10 ? game.factions[0].factionId : game.factions[1].factionId,
factionPassword:
......@@ -93,6 +96,14 @@ export class ReplayService {
? game.factions[0].factionPassword
: game.factions[1].factionPassword,
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);
}
......@@ -101,7 +112,7 @@ export class ReplayService {
let x1 = 62.3;
let y2 = 25.75;
let x2 = 62.35;
for (let i = 1; i < 16 * 6 * 3; i++) {
for (let i = 1; i < 6; i++) {
let x = 0;
date += 10000;
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