Skip to content

Commit 34a29c8

Browse files
committed
First commit: Solutions added
1 parent c02b130 commit 34a29c8

File tree

9 files changed

+402
-265
lines changed

9 files changed

+402
-265
lines changed

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:3000",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

README.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Solutions to additional problems given in React's "tic tac toe" tutorial.
2+
13
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
24

35
## Available Scripts
@@ -12,33 +14,6 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1214
The page will reload if you make edits.<br>
1315
You will also see any lint errors in the console.
1416

15-
### `npm test`
16-
17-
Launches the test runner in the interactive watch mode.<br>
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19-
20-
### `npm run build`
21-
22-
Builds the app for production to the `build` folder.<br>
23-
It correctly bundles React in production mode and optimizes the build for the best performance.
24-
25-
The build is minified and the filenames include the hashes.<br>
26-
Your app is ready to be deployed!
27-
28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29-
30-
### `npm run eject`
31-
32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33-
34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35-
36-
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37-
38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
39-
40-
## Learn More
41-
42-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
17+
### `Useful links`
4318

44-
To learn React, check out the [React documentation](https://reactjs.org/).
19+
Tutorial page: [React documentation](https://reactjs.org/tutorial/tutorial.html).

src/App.css

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/App.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/App.test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/index.css

Lines changed: 79 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,80 @@
11
body {
2-
margin: 0;
3-
padding: 0;
4-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
5-
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
6-
sans-serif;
7-
-webkit-font-smoothing: antialiased;
8-
-moz-osx-font-smoothing: grayscale;
9-
}
10-
11-
code {
12-
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
13-
monospace;
14-
}
2+
font: 14px "Century Gothic", Futura, sans-serif;
3+
margin: 20px;
4+
}
5+
6+
.active {
7+
font-weight: 600;
8+
}
9+
10+
.inactive {
11+
font-weight: normal;
12+
}
13+
14+
ol, ul {
15+
padding-left: 30px;
16+
}
17+
18+
.board-row:after {
19+
clear: both;
20+
content: "";
21+
display: table;
22+
}
23+
24+
.status {
25+
margin-bottom: 10px;
26+
}
27+
28+
.square {
29+
background: #fff;
30+
border: 1px solid #999;
31+
float: left;
32+
font-size: 24px;
33+
font-weight: bold;
34+
line-height: 34px;
35+
height: 34px;
36+
margin-right: -1px;
37+
margin-top: -1px;
38+
padding: 0;
39+
text-align: center;
40+
width: 34px;
41+
}
42+
43+
.square:focus {
44+
outline: none;
45+
}
46+
47+
.kbd-navigation .square:focus {
48+
background: #ddd;
49+
}
50+
51+
.winningSquares {
52+
color: #000;
53+
background: rgb(142, 252, 99);
54+
}
55+
56+
.draw {
57+
text-align: center;
58+
width: 102px;
59+
height: 102px;
60+
background-color: #ddd;
61+
padding: 20px;
62+
}
63+
64+
.win {
65+
text-align: center;
66+
}
67+
68+
.reset {
69+
padding: 5px;
70+
}
71+
72+
.game {
73+
display: flex;
74+
flex-direction: row;
75+
}
76+
77+
.game-info {
78+
margin-left: 20px;
79+
}
80+

0 commit comments

Comments
 (0)