add cpuRepo
This commit is contained in:
parent
b978835251
commit
72bc385048
@ -1,15 +1,20 @@
|
|||||||
import { CountUp } from "https://cdnjs.cloudflare.com/ajax/libs/countup.js/2.6.0/countUp.min.js";
|
import { CountUp } from "https://cdnjs.cloudflare.com/ajax/libs/countup.js/2.6.0/countUp.min.js";
|
||||||
import { Stats } from "./statistics.js";
|
import { Stats } from "./statistics.js";
|
||||||
|
import { CpuRepository } from "./cpuRepository.js"
|
||||||
|
|
||||||
var cpuList;
|
var cpuList;
|
||||||
var currentCpu;
|
var currentCpu;
|
||||||
var nextCpu;
|
var nextCpu;
|
||||||
|
|
||||||
|
var repo;
|
||||||
var localStats;
|
var localStats;
|
||||||
|
|
||||||
export async function main() {
|
export async function main() {
|
||||||
localStats = new Stats("highScore_cpu");
|
localStats = new Stats("highScore_cpu");
|
||||||
|
|
||||||
|
repo = new CpuRepository();
|
||||||
|
await repo.init();
|
||||||
|
|
||||||
await (fetch('./js/data.json')
|
await (fetch('./js/data.json')
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((json) => cpuList = json));
|
.then((json) => cpuList = json));
|
||||||
|
Loading…
Reference in New Issue
Block a user