Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pong: Socket 연결 및 게임 목록 기능 구현 #105

Merged
merged 12 commits into from
Feb 18, 2023

Conversation

devleomk1
Copy link
Collaborator

게임 소켓 연결 및 게임 목록 기능을 구현 했습니다.

@devleomk1 devleomk1 self-assigned this Feb 18, 2023
@devleomk1 devleomk1 linked an issue Feb 18, 2023 that may be closed by this pull request
@aws-amplify-ap-northeast-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-105.dxp8fprj5jmg7.amplifyapp.com

@Skyrich2000
Copy link
Collaborator

socket 연결 다 확인했으니까 ping pong 뺄까여

chichoon
chichoon previously approved these changes Feb 18, 2023
Copy link
Member

@chichoon chichoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f844ed3587fba267478aec80462dd627d9c9080b42d513fd03af7585ac165ca6

Comment on lines +7 to +10
const uuid = useLocation().pathname.split('/')[2];
const gameRoomList = useRecoilValue(gameRoomListState);

const foundGameRoom = gameRoomList.find(gameRoom => gameRoom.id === uuid);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 uuid가 undefined 걸리면 어케 되나요

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 터질 일은 없을거같긴 함

Comment on lines 6 to 16
joinChatRoomState,
leaveChatRoomState,
newChatRoomState,
newGamePingMessageState,
newMessageState,
updateChatRoomState,
joinGameRoomState,
newGameRoomState,
updateGameRoomState,
leaveGameRoomState,
} from 'store';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

와 이거 챗부분 이PR 머지되면 제가 나눠둘게요,,..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵넵

setNewGameRoom({
created: true,
});
console.log('Click New Game Button\n');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

콘솔로그 다 지우고 올리기로 한 것이 아니었나묘???

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

았!

<button type="button" onClick={handleClickButton} className={gameRoomIconStyle}>
<PlusIcon />
</button>
{isModalShown && (
<Modal onClickClose={handleClickClose} className={newGameModalWrapperStyle}>
<header className={newGameModalHeaderStyle}>
<h4> 게임</h4>
<h4>🐦 게임 만들기</h4>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 킹받아!!!!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아..

@devleomk1
Copy link
Collaborator Author

@Skyrich2000 @chichoon 올려주신 내용 수정해서 올렸습니다.

@github-actions
Copy link

console.log 발견 👀

Comment on lines +11 to +15
useEffect(() => {
return () => {
setLeaveGameRoom({ id: currentGameRoom.id });
};
}, []);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 3 to 6
export const newGamePingMessageState = atom<string>({
key: 'newGamePingMessageState',
default: '',
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 이제 필요없지 않나염

chichoon
chichoon previously approved these changes Feb 18, 2023
Copy link
Member

@chichoon chichoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

<div className={newGameFormStyle}>
<div className={newGameInnerDivStyle}>
<div className={formSectionDivStyle}>
<label htmlFor="new-chat-name">이름따위설정할수없다</label>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋ 이거모임

exceptionHandler,
disconnectHandler,
});
sockets.gameSocket.on('join_room', joinGameRoomHandler);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기에
sockets.gameScoket.on('update_game_room', getAllGameRoomHandler); 빠진듯?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정완료!

@github-actions
Copy link

console.log 발견 👀

@github-actions
Copy link

console.log 발견 👀

@devleomk1 devleomk1 merged commit 867ce7c into main Feb 18, 2023
@devleomk1 devleomk1 deleted the feat/pong-socketio-multi branch February 18, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pong: Socket.io로 멀티플레이 연결 구현
3 participants