P
Fatih ŞAHİNBAŞ• 470
@fsahinbas
Posted
Excellent work. I like it much.
1
What are you most proud of, and what would you do differently next time?
What challenges did you encounter, and how did you overcome them?
...
useEffect(() => {
if (
(gameType === "CPU" &&
!winner &&
playerTurn === player2Mark &&
player2Mark === "O" &&
!initialCpuMove &&
moveNumber > 0) ||
(gameType === "CPU" &&
!winner &&
playerTurn === player2Mark &&
player2Mark === "X" &&
initialCpuMove &&
moveNumber > 0)
)
setTimeout(() => {
addCpuMove(gameboard);
}, 0);
}, [playerTurn, winner, gameType, player2Mark, gameboard, initialCpuMove]);
What specific areas of your project would you like help with?
Probably a way to make the CPU player somewhat smart, instead of relying on random moves.
@fsahinbas
Posted
Excellent work. I like it much.
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord