kill
This commit is contained in:
parent
6cecebec12
commit
78a5e73371
@ -16,6 +16,8 @@ class Cell extends Component {
|
|||||||
this.state.color = "red";
|
this.state.color = "red";
|
||||||
} else if (this.state.shotState === ".") {
|
} else if (this.state.shotState === ".") {
|
||||||
this.state.color = "grey";
|
this.state.color = "grey";
|
||||||
|
} else if (this.state.shotState === "+") {
|
||||||
|
this.state.color = "yellow";
|
||||||
} else {
|
} else {
|
||||||
this.state.color = "white";
|
this.state.color = "white";
|
||||||
}
|
}
|
||||||
@ -54,7 +56,7 @@ class Cell extends Component {
|
|||||||
}, (response) => {
|
}, (response) => {
|
||||||
if (response.shot) {
|
if (response.shot) {
|
||||||
this.setState({
|
this.setState({
|
||||||
shotState: "x",
|
shotState: "+",
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
@ -80,6 +82,8 @@ class Cell extends Component {
|
|||||||
color = "darkcyan";
|
color = "darkcyan";
|
||||||
} else if (this.state.shotState === ".") {
|
} else if (this.state.shotState === ".") {
|
||||||
color = "gray";
|
color = "gray";
|
||||||
|
} else if (this.state.shotState === "+") {
|
||||||
|
color = "yellow";
|
||||||
} else if (this.symb === "o") {
|
} else if (this.symb === "o") {
|
||||||
color = "green";
|
color = "green";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user