Git Product home page Git Product logo

sei-24-project-1's Introduction

Connect 4 Game

Content Page

Description

This game is played on a vertical board wich has seven hollow columns and six rows. Each column has a hole in the upper part of the board, where pieces are introduced. There is a window for every square, so that pieces can be seen from both sides.

In short, it´s a vertical board with 42 windows distributed in 6 rows and 7 columns.

Both players have a set of 21 thin pieces (like coins); each of them uses a different colour. The board is empty at the start of the game.

The player with yellow coins will start first.

Live Demo

Objectives

The aim for both players is to make a straight line of four own pieces; the line can be vertical, horizontal or diagonal.

Gameplay

Before starting, players decide randomly which of them will be the beginner; moves are made alternatively, one by turn.

Moves entails in placing new pieces on the board; pieces slide downwards from upper holes, falling down to the last row or piling up on the last piece introduced in the same column. So, in every turn the introduced piece may be placed at most on seven different squares.

The winner is the first player who gets a straight line made with four own pieces and no gaps between them.

App

Fork it and open landingpage.html to load up the main landing page.

Press 'Enter' key for Windows or 'Return" key for Mac OS to start game.

Rules are as mentioned above.

demo

Features

Play against a friend on multiplayer mode

Or alternatively play against an AI whose algorithm is based off the minimax algorithm.

Adjust AI difficulty accordingly using the buttons on the side of the game board.

Tech stacks used

HTML, CSS, Javascript.

Misc: font-awesome.

References

https://en.wikipedia.org/wiki/Minimax#:~:text=chances%20of%20winning).-,Minimax%20algorithm%20with%20alternate%20moves,or%20state%20of%20the%20game

https://fontawesome.com/v4.7.0

sei-24-project-1's People

Contributors

chewjta avatar

Watchers

 avatar

Forkers

thngkia

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.