This commit is contained in:
Administrator 2022-08-28 19:06:56 +03:00
parent 6cecebec12
commit 78a5e73371

View File

@ -16,6 +16,8 @@ class Cell extends Component {
this.state.color = "red";
} else if (this.state.shotState === ".") {
this.state.color = "grey";
} else if (this.state.shotState === "+") {
this.state.color = "yellow";
} else {
this.state.color = "white";
}
@ -54,7 +56,7 @@ class Cell extends Component {
}, (response) => {
if (response.shot) {
this.setState({
shotState: "x",
shotState: "+",
})
} else {
this.setState({
@ -80,6 +82,8 @@ class Cell extends Component {
color = "darkcyan";
} else if (this.state.shotState === ".") {
color = "gray";
} else if (this.state.shotState === "+") {
color = "yellow";
} else if (this.symb === "o") {
color = "green";
}