Share your repls and programming experiences

← Back to all posts
Connect 4 - The online version (play on one device or on different devices)
ruiwenge2

This is an online version of the board game. There are two ways to play, on one device, or on two different devices (using Socket.IO). For playing on different devices, you'll have to login with Replit so people will know your name, then enter the room name. People in the same room will play against each other, and you'll be able to see the other player's moves. To invite someone you will have to enter their Replit username. If you invite another player the player you invite has to be on the website to see recieve it.

Features

  • Play on one device
  • Play on different devices and see your opponent's moves
  • Invite other players and recieve invites

In case you don't know the rules:

The board is a 6 by 7 grid, and there are two colors for the pieces: yellow and red. Yellow goes first. When you move, choose a column to drop your piece in. The piece will "fall down" until it reaches the first row or gets on top of an old piece. The goal of this game is to get four of your pieces in a row (vertically, horizontally, and diagonally). If every tile in the grid has been taken, it's a tie.

If you want to play a game against me, go to the room admin (I may or may not be available). Or you can invite me to a room.

Enjoy!

Credits

Thanks to @Coder100 again for helping me with Socket.IO.

Voters
ElizabethWitte
Koolguy123
VihaanM1
SilvermoonCat
CosmicBear
maxina
asyncvoid
RyderBolt95
annieva2
CodingEssence
Comments
hotnewtop
AvaniGali

WOW! THIS IS AMAZING! I can’t scroll down though.

ruiwenge2

now you can @AvaniGali

AvaniGali

@ruiwenge2 ok thanks!

OldWizard209

lmao make it responsive if you want i playable on all devices:

ruiwenge2
ruiwenge2

@FlaminHotValdez I saw you were on the website, do you want to play against me?

FlaminHotValdez

@ruiwenge2 Oof, little too late lmao

ruiwenge2

aw thats fine @FlaminHotValdez

Coder100

Yay nice!!

ruiwenge2
[deleted]

POG

ruiwenge2

@Martin025 thanks!

JakeHu2020

why does the 2nd user keep getting kicked

ruiwenge2
codingjlu

Awesome!!

ruiwenge2

@codingjlu thanks!

codingjlu

@ruiwenge2 I bet this'll get trending again (maybe both of your projects will dominate trending lol)

ruiwenge2
codingjlu

@ruiwenge2 yes it definitely is. 1 hour in with 7 votes. Things looking good!

codingjlu

@ruiwenge2 this will definitely get trending in no time lol

VulcanWM

woah that's nice!

ruiwenge2

thanks! @VulcanWM

VulcanWM