jpotts244 / jpotts244.github.io Goto Github PK
View Code? Open in Web Editor NEWJust a regular old blog
Home Page: http://jpotts244.github.io/
Just a regular old blog
Home Page: http://jpotts244.github.io/
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;
}
}
}
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.