Files
react-tutorial/README.MD
2025-01-23 22:20:07 +09:00

32 lines
1.4 KiB
Markdown

# [리액트 튜토리얼 : 택택토 만들기](https://ko.react.dev/learn/tutorial-tic-tac-toe)
```bash
# 위 제목을 클릭하면 튜토리얼 페이지로 이동합니다.
git clone https://gitea.rsone.duckdns.org/bigdeejay/react_tutorial.git
cd react_tutorial
npm install
npm start
```
```
Compiled successfully!
You can now view react.tictactoe in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.56.1:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
webpack compiled successfully
```
# 개선 과제
1) 현재 이동에 대해서만 버튼 대신 “당신은 #번째 순서에 있습니다…”를 표시해 보세요.
2) Board를 하드 코딩 하는 대신 두 개의 루프를 사용하여 사각형을 만들도록 다시 작성해 보세요.
3) 동작을 오름차순 또는 내림차순으로 정렬할 수 있는 토글 버튼을 추가해 보세요.
4) 누군가 승리하면 승리의 원인이 된 세 개의 사각형을 강조 표시해 보세요. (아무도 승리하지 않으면 무승부라는 메시지를 표시하세요. )
5) 이동 히스토리 목록에서 각 이동의 위치를 형식(열, 행)으로 표시해 보세요.
![결과물](https://gitea.rsonesoft.com/bigdeejay/react_tutorial/raw/commit/369213999f84d68ac7a48d98c607deaf06b5698c/tictactoe.png)