Coder Social home page Coder Social logo

irinastelea / connect-four-or-more Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 64.85 MB

Online two-player game powered by Vue3, Node.js and Typescript.

JavaScript 0.69% HTML 1.21% Vue 56.64% CSS 4.97% TypeScript 36.46% Procfile 0.04%
express game nodejs online socket-io vue connect4 connect4-game two-player-game typescript

connect-four-or-more's Introduction

๐Ÿ”ด Connect4/more - Online two-player game ๐ŸŸก

Overview

Online two-player game where users take turns 'dropping' pieces into a slot-based gameboard.

The first user who manages to connect horizontally, vertically or diagonally four or more of their own pieces wins.

๐Ÿ“ฑ ๐Ÿ–ฅ Optimized for both mobile & desktop.

๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ‘ฉโ€๐Ÿ’ป Made by @RobertMoravek and @IrinaStelea

Features

  • Two-player setup

    • the player who starts the game (admin) invites the opponent via a unique code
  • Customisable game board

    • the number of rows, column and slots required to win can be chosen by the admin player from a predefined range
  • Realtime game experience

    • the game updates to the next state depending on the status/choices of each player
    • the game reacts to the player whose turn it is and, once a slot has been added, it shows the outcome to both players
  • Victory / draw

    • in case of victory / loss / draw, the game displays the relevant notification to each player
  • Multiple games

    • each of the two players can choose to invite the opponent to a new game
    • the admin player can re-configure the board in-between games
    • score updates accordingly
  • Animated game elements and user-friendly design

  • Other functionalities

    • when a user leaves the game / is disconnected, the other user gets a relevant notification
    • server-side validation of the game configuration
    • client & server-side validation of moves
    • player turn is random for first game and alternates for the next games in the same streak
    • error handling

Technology

  • Typescript (Backend and Frontend)
  • Vue3 (Composition API + Script Setup)
  • Node.js & Express
  • Socket.io

Set up this project locally

  • clone the repository
  • install all the dependencies with npm install
  • run the project locally with npm run dev and open it at localhost:8080

Previews

Game start & configuration


Realtime game experience: playing


Realtime game experience: results


Multiple games

User leave/disconnect


connect-four-or-more's People

Contributors

irinastelea avatar robertmoravek avatar

Watchers

 avatar  avatar

connect-four-or-more's Issues

fixes FE functionality

  • fix flicker right after falling slot
  • carry over current game config to the config options shown in ResultsView

fixes results view

once either player clicks on play again, hide the results, lower the yellow message and only show relevant buttons
background of box should all change to yellow once either has clicked on play again

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.