File tree 1 file changed +24
-1
lines changed 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class Game extends React.Component {
7
7
return (
8
8
< div className = "game" > { /* React comment example */ }
9
9
< div className = "game-board" > { /* Space destined to host an specific component */ }
10
- Game Board
10
+ < Board /> { /* (3rd step) Link Board component with Game component */ }
11
11
</ div >
12
12
< div className = "game-info" > { /* Space destined to log Game actions */ }
13
13
</ div >
@@ -16,6 +16,29 @@ class Game extends React.Component {
16
16
}
17
17
}
18
18
19
+
20
+ class Board extends React . Component {
21
+ render ( ) {
22
+ const status = 'Next Player X' ; // Board need to know who is playing, set initial Board state to player 'X' or 'O'.
23
+
24
+ return ( // We want a [3row x 3col] tic-tac-toe
25
+ < div >
26
+ < div className = "status" > { status } </ div >
27
+ < div className = "board-row" > Row
28
+ { /* Insert row-Squares-amount here (4th step) */ }
29
+ </ div >
30
+ < div className = "board-row" > Row
31
+ { /* Insert row-Squares-amount here (4th step) */ }
32
+ </ div >
33
+ < div className = "board-row" > Row
34
+ { /* Insert row-Squares-amount here (4th step) */ }
35
+ </ div >
36
+ </ div >
37
+ ) ;
38
+ }
39
+ }
40
+
41
+
19
42
// ==================================
20
43
21
44
ReactDOM . render (
You can’t perform that action at this time.
0 commit comments