Share your repls and programming experiences

← Back to all posts
Games I Created
cursorCodeYoutb (16)

Quarantine made me do this

Comments
hotnewtop
SeamusDonahue (457)

horrible css but good games.

cursorCodeYoutb (16)

@SeamusDonahue yea I didn't try to hard, I was trying to pump it out quickly but I find that the site locks good but not the code haha.

cuber1515 (56)

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).

cursorCodeYoutb (16)

@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

cursorCodeYoutb (16)

@cuber1515 np u can ask me questions if u need help

cursorCodeYoutb (16)

@cuber1515 Thanks for commenting on my
Repl, it means allot to me. :)

cursorCodeYoutb (16)

@cuber1515 Thanks, I put allot of effort into this, its my first time publishing something decent and I'm very happy you like it!

PyPookie (1)

Quarantine got us all coding more I think.

CyberHacker101 (127)

quarantine made me realize my lifestyle was quarantine sad sad times... @PyPookie

ChopSueyMaster (50)

If only the CSS was better, this would be amazing.

cursorCodeYoutb (16)

@ChopSueyMaster Yes, I rushed it a little bit and my css skills are not fantastic to say the least. But thanks for putting a comment it means allot to me.