Games I Created
Quarantine made me do this
Can you send me the spotlight for connect 4, I tried making that game before but after I styled the whole thing I didn't know the rest (except for putting in a piece, but I couldn't keep it from being a floating piece and ppl could replace the piece with theirs if they wanted and i couldn't change turns).
@cuber1515 I mad a loop that creates 42 divs (6x7) for each circle in the grid and then styled them. I then made an array that contains all of those divs in that array so that I can track them. When I click a div, a function runs and adds a class of "taken" to that div and also adds the color so "blue" or "red" to that div. Then I have a funciton that checks where to drop the coin by checking if the current square clicked isn't taken and the one underneath is taken(if its not, check the one below that until we get to the 7th one) then it adds a class of "taken" and the color of the div. This makes sure that we cant click the same div twice because it is already taken. To check if a player won, I go threw an array (ill send it to u if u want cause its very long) of winning combination and see if there are 4 in a row that are blue or red.
Here is the code but I didnt intend to share it so its not to well organised. https://replit.com/@cursorCodeYT101/connect-4#index.html