diff --git a/.gitignore b/.gitignore index 4d29575..fda0f23 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +/.idea # dependencies /node_modules diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index 2bd203a..44c2e7c 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -1,3 +1,10 @@ +/** + * @file Корневой компонент + * @version 2022.01.26 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + import './App.css'; import IntroPage from '../IntroPage/IntroPage'; import GamePage from '../GamePage/GamePage'; diff --git a/src/components/GamePage/GamePage.tsx b/src/components/GamePage/GamePage.tsx index 3a21074..10c8dd8 100644 --- a/src/components/GamePage/GamePage.tsx +++ b/src/components/GamePage/GamePage.tsx @@ -1,3 +1,10 @@ +/** + * @file Страница игры + * @version 2022.01.26 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + import _ from 'lodash'; // @ts-ignore diff --git a/src/components/IntroPage/IntroPage.tsx b/src/components/IntroPage/IntroPage.tsx index fa3ec8f..d140950 100644 --- a/src/components/IntroPage/IntroPage.tsx +++ b/src/components/IntroPage/IntroPage.tsx @@ -1,3 +1,10 @@ +/** + * @file Страница приветствия + * @version 2022.01.26 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + // @ts-ignore import witch from '../../resources/witch.svg'; import './IntroPage.css'; diff --git a/src/model/Game.ts b/src/model/Game.ts index 8a49aa0..c26bc8f 100644 --- a/src/model/Game.ts +++ b/src/model/Game.ts @@ -1,6 +1,13 @@ +/* + * @file Класс + * @version 2022.2.6 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + import { Witch } from './Witch'; -export type Game = { +export type Game = { guid: string, score: number, witches: Witch[], diff --git a/src/model/GameDto.ts b/src/model/GameDto.ts index 5765733..94aad09 100644 --- a/src/model/GameDto.ts +++ b/src/model/GameDto.ts @@ -1,6 +1,13 @@ +/* + * @file Класс + * @version 2022.2.6 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + import { IWitchDto } from './WitchDto'; -export type IGameDto = { +export type IGameDto = { guid: string, score: number, witches: IWitchDto[], diff --git a/src/model/Witch.ts b/src/model/Witch.ts index 3d30131..72e3c8e 100644 --- a/src/model/Witch.ts +++ b/src/model/Witch.ts @@ -1,3 +1,10 @@ +/** + * @file Описание игрового элемента - ведьмы (фронтенд) + * @version 2022.01.26 + * @author Verevkin S.A. + * @copyright Verevkin S.A. + */ + export type Witch = { guid: string, position: number, diff --git a/src/model/WitchDto.ts b/src/model/WitchDto.ts index e2af155..6e939d4 100644 --- a/src/model/WitchDto.ts +++ b/src/model/WitchDto.ts @@ -1,5 +1,13 @@ +/* + * * + * * @file Класс + * * @version {2022}.{2}.{6} + * * @author Verevkin S.A. + * * @copyright Verevkin S.A. + * + */ + export interface IWitchDto { guid: string, - flagReal: boolean, position: number, }; diff --git a/src/store/apiStore/apiStore.service.ts b/src/store/apiStore/apiStore.service.ts index b435385..5ce6a4c 100644 --- a/src/store/apiStore/apiStore.service.ts +++ b/src/store/apiStore/apiStore.service.ts @@ -1,6 +1,6 @@ -/** - * @file Сервис для источника данных - * @version 2022.01.26 +/* + * @file Класс + * @version 2022.2.6 * @author Verevkin S.A. * @copyright Verevkin S.A. */ @@ -32,7 +32,7 @@ const service = { async getVersion(): Promise { return tool.get('/version', {}); } - // endregion + // endregion }; export default service; diff --git a/src/store/apiStore/mockApiStore.service.ts b/src/store/apiStore/mockApiStore.service.ts index 403584e..a883362 100644 --- a/src/store/apiStore/mockApiStore.service.ts +++ b/src/store/apiStore/mockApiStore.service.ts @@ -1,6 +1,6 @@ -/** - * @file Эмулятор сервера - * @version 2022.01.26 +/* + * @file Класс + * @version 2022.2.6 * @author Verevkin S.A. * @copyright Verevkin S.A. */ @@ -33,7 +33,7 @@ const mockService = { return this.h_restartGame(); } this.score -= 1; - return { ...game, score: this.score}; + return {...game, score: this.score}; }, async getVersion(): Promise { @@ -58,7 +58,7 @@ const mockService = { h_createWitches(count: number): ServerWitch[] { let ar: ServerWitch[] = []; const dt = Date.now().toString(10); - for(let ii=0;ii( method: string, - args: any, + args: ParamGet[], ): Promise { const url = this.apiUrl + method; const requestConfig = { - params: Object + params: _.fromPairs(args.map((v) => [v.name, v.value])) }; return axios .get(