Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tyclaire #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

tyclaire #54

wants to merge 1 commit into from

Conversation

lolkinetzky
Copy link

it's all in the title holy cow ty

Copy link

@jmaddox19 jmaddox19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up until Wave 3, everything looks good!
It looks like you didn't have time to figure out what was going wrong with wave 3. I'm glad you just submitted what you had!

}

const winner = winnerIs();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need a piece of state for winner so that weird things don't happen with this variable.


const onClickCallback = (clickedSquare) => {
const newSquares = [];
if (winner !== '') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to issues that are arising because the winner isn't tracked as part of the state, this is triggering as true after the first move because the function returns null when there's no winner while this code is looking for an empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants