summaryrefslogtreecommitdiff
path: root/fixtures.js
blob: f036f0133b86cec4703183cd1f05a1a1bc843a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { newGame } from './database/games.js';
import { createUser } from './database/users.js';
import { emptyBoard } from './utils/board.js';

await createUser('Alice', 'Alice42!', 'alice@example.com');
await createUser('Bob', 'Bob42!', 'bob@example.com');
const data = {
	board: emptyBoard,
	name: 'Alice vs Bob',
	player1: {
		id: 1,
		username: 'Alice',
		score: 0,
		letters: ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
	},
	player2: {
		id: 2,
		username: 'Bob',
		score: 0,
		letters: ['T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
	},
};
newGame(1, 2, data);