labag 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Mode, ModeNames } from "./types/Mode";
3
3
  import { PlayLaBaG } from "./types/PlayLaBaG";
4
4
  import { JsonLaBaG } from "./types/JsonLaBaG";
5
5
  import { P, PData } from "./types/P";
6
+ import { parseScore, verifyScore } from './utils/data';
6
7
  declare const PDatas: Record<string, PData>;
7
8
  declare const Modes: Record<Exclude<ModeNames, "Normal">, Mode>;
8
- export { OneDataType, AllDataType, LaBaG, PlayLaBaG, JsonLaBaG, Modes, ModeNames, P, PData, PDatas, };
9
+ export { OneDataType, AllDataType, LaBaG, PlayLaBaG, JsonLaBaG, Modes, ModeNames, P, PData, PDatas, parseScore, verifyScore, };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PDatas = exports.P = exports.Modes = exports.JsonLaBaG = exports.PlayLaBaG = void 0;
3
+ exports.verifyScore = exports.parseScore = exports.PDatas = exports.P = exports.Modes = exports.JsonLaBaG = exports.PlayLaBaG = void 0;
4
4
  const RandInt_1 = require("./utils/RandInt");
5
5
  const PlayLaBaG_1 = require("./types/PlayLaBaG");
6
6
  Object.defineProperty(exports, "PlayLaBaG", { enumerable: true, get: function () { return PlayLaBaG_1.PlayLaBaG; } });
@@ -8,6 +8,9 @@ const JsonLaBaG_1 = require("./types/JsonLaBaG");
8
8
  Object.defineProperty(exports, "JsonLaBaG", { enumerable: true, get: function () { return JsonLaBaG_1.JsonLaBaG; } });
9
9
  const P_1 = require("./types/P");
10
10
  Object.defineProperty(exports, "P", { enumerable: true, get: function () { return P_1.P; } });
11
+ const data_1 = require("./utils/data");
12
+ Object.defineProperty(exports, "parseScore", { enumerable: true, get: function () { return data_1.parseScore; } });
13
+ Object.defineProperty(exports, "verifyScore", { enumerable: true, get: function () { return data_1.verifyScore; } });
11
14
  const PDatas = {
12
15
  Gss: {
13
16
  name: "咖波",
@@ -1,9 +1,10 @@
1
+ import { AllDataType } from "..";
1
2
  import { BaseLaBaG } from "./BaseLaBaG";
2
3
  export declare class JsonLaBaG extends BaseLaBaG {
3
- jsonData: BaseLaBaG["AllData"];
4
+ jsonData: AllDataType;
4
5
  dataIndex: number;
5
6
  constructor();
6
- SetupData(data: BaseLaBaG["AllData"]): void;
7
+ SetupData(data: AllDataType): void;
7
8
  Reset(): void;
8
9
  Random(): void;
9
10
  Result(): void;
@@ -10,14 +10,14 @@ class JsonLaBaG extends BaseLaBaG_1.BaseLaBaG {
10
10
  constructor() {
11
11
  super();
12
12
  this.jsonData = {};
13
- this.dataIndex = 0;
13
+ this.dataIndex = 1;
14
14
  }
15
15
  SetupData(data) {
16
16
  this.jsonData = data;
17
17
  }
18
18
  Reset() {
19
19
  super.Reset();
20
- this.dataIndex = 0;
20
+ this.dataIndex = 1;
21
21
  }
22
22
  Random() {
23
23
  const currData = this.jsonData[`${this.dataIndex}`];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labag",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -4,6 +4,7 @@ import { RandInt } from "./utils/RandInt";
4
4
  import { PlayLaBaG } from "./types/PlayLaBaG";
5
5
  import { JsonLaBaG } from "./types/JsonLaBaG";
6
6
  import { P, PData } from "./types/P";
7
+ import { parseScore, verifyScore } from './utils/data';
7
8
 
8
9
  const PDatas: Record<string, PData> = {
9
10
  Gss: {
@@ -188,8 +189,11 @@ export {
188
189
 
189
190
  Modes,
190
191
  ModeNames,
191
-
192
+
192
193
  P,
193
194
  PData,
194
195
  PDatas,
196
+
197
+ parseScore,
198
+ verifyScore,
195
199
  };
@@ -1,23 +1,23 @@
1
1
  import { P } from "./P";
2
- import { Modes } from "..";
2
+ import { AllDataType, Modes } from "..";
3
3
  import { BaseLaBaG } from "./BaseLaBaG";
4
4
 
5
5
  export class JsonLaBaG extends BaseLaBaG {
6
- jsonData: BaseLaBaG["AllData"];
6
+ jsonData: AllDataType;
7
7
  dataIndex: number;
8
8
  constructor() {
9
9
  super();
10
10
  this.jsonData = {};
11
- this.dataIndex = 0;
11
+ this.dataIndex = 1;
12
12
  }
13
13
 
14
- SetupData(data: BaseLaBaG["AllData"]): void {
14
+ SetupData(data: AllDataType): void {
15
15
  this.jsonData = data;
16
16
  }
17
17
 
18
18
  Reset(): void {
19
19
  super.Reset();
20
- this.dataIndex = 0;
20
+ this.dataIndex = 1;
21
21
  }
22
22
 
23
23
  Random(): void {