Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceankoh committed Jan 20, 2024
2 parents ed3fd13 + 7d64057 commit 5036464
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/src/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ export default function Game({
// ];

useEffect(() => {
onUpdate((_, isTurn /*, lastMove*/) => {
// TODO update on opponent move
onUpdate((_, isTurn, lastMove) => {
if (isTurn)
setMessages((msgs) =>
msgs.concat({ outgoing: false, text: "Your turn!" })
msgs.concat(
{ outgoing: false, text: lastMove },
{ outgoing: false, text: "Your turn!" }
)
);
});
onGameover((text) => {
Expand Down

0 comments on commit 5036464

Please sign in to comment.