aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/Chessh.ts19
-rw-r--r--src/api/index.ts2
2 files changed, 20 insertions, 1 deletions
diff --git a/src/api/Chessh.ts b/src/api/Chessh.ts
new file mode 100644
index 0000000..898fccb
--- /dev/null
+++ b/src/api/Chessh.ts
@@ -0,0 +1,19 @@
+export interface BotMoveRequest {
+ bot_id: number;
+ bot_name: string;
+ game_id: number;
+ fen: string;
+ turn: string;
+ bot_turn: boolean;
+ last_move: string;
+ status: string;
+}
+
+export interface BotMoveAttempt {
+ token: string;
+ attempted_move: string;
+}
+
+export interface BotMoveResponse {
+ message: string;
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index ae9b26a..39f5b40 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -3,7 +3,7 @@ import {
BotMoveRequest,
BotMoveAttempt,
BotMoveResponse,
-} from '../interfaces/Chessh';
+} from './Chessh';
import axios from 'axios';
import { aiMove } from 'js-chess-engine';