Skip to content

Commit 2ffbdc5

Browse files
committed
fix: Fix Cheating Type
1 parent bb00424 commit 2ffbdc5

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

client/src/components/canvas/GameCanvas.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const GameCanvas = ({
9696

9797
const canvasCaptureInterval = setInterval(() => {
9898
void sendCanvasImage();
99-
}, 15000);
99+
}, 10000);
100100

101101
return () => clearInterval(canvasCaptureInterval);
102102
}, [roomStatus, isHost]);

client/src/hooks/socket/useGameSocket.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
PlayerStatus,
1313
RoomEndResponse,
1414
TerminationType,
15-
Cheating,
1615
} from '@troublepainter/core';
1716
import { DrawingCheckedResponse } from '@troublepainter/core';
1817
import { useNavigate, useParams } from 'react-router-dom';
@@ -230,16 +229,8 @@ export const useGameSocket = () => {
230229

231230
if (result === 'OK' || roomStatus !== RoomStatus.DRAWING) return;
232231

233-
const map: Partial<Record<Cheating, string>> = {
234-
INITIAL: '초성',
235-
FULL_ANSWER: '단어',
236-
LENGTH: '단어 길이',
237-
};
238-
239-
const cheatType = map[result] ?? '알 수 없는';
240-
241232
toastActions.addToast({
242-
title: `${cheatType} 부정행위!`,
233+
title: `부정행위 감지!`,
243234
description: '누군가 그림 대신 글씨를 썼네요! 그림을 그려야죠 😊 글씨는 지워 주세요~',
244235
variant: 'warning',
245236
});

core/types/game.types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,5 @@ export enum TerminationType {
5050

5151
export enum Cheating {
5252
OK = 'OK',
53-
LENGTH = 'LENGTH',
54-
INITIAL = 'INITIAL',
55-
FULL_ANSWER = 'FULL_ANSWER',
53+
WARN = 'WARN',
5654
}

0 commit comments

Comments
 (0)