Giter Club home page Giter Club logo

jpotts244.github.io's People

Contributors

jpotts244 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

jpotts244.github.io's Issues

check winner function

Hi Anna,

Am I on the right track with this part of the function? I am still working on the part that determines if elements from the xarray are in the winners array. Where xarray is the current X's location on the game board. I cannot get it to return true, I've tried several variations of this, wondering if you would need two arrays going on at the same time? One to iterate through winners array and one going through the xarray at the same time? Thanks again!!!

var winners = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]];

var checkWinner = function checkWinner () {
    for (var i = 0; i < winners.length; i++) {
        if (xarray.indexOf(winners[i]) != -1) {
            console.log("true");
            return true;
        } else{
            console.log(false);
            return false;
        }

}
}

Code Check-in

Hi Anna,

Wondering if I can talk through my project with you sometime today? It is pretty basic and it works, so I am OK with that- I would love to be able to show you it before the big day. If you are busy it is totally cool, this is not an emergency. :-)

Let me know! Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.