Git Product home page Git Product logo

connect-four's Introduction

Netlify Status

connect-four

A web-based version of the classic game Connect Four.

Connect Four is a two-player connection board game. It is also known as Connect 4, Four Up, Plot Four, Find Four, Captain's Mistress, Four in a Row, Drop Four, and Gravitrips in the former Soviet Union.

Players choose a colour and then take turns dropping coloured tokens into a seven-column, six-row, vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column.

The game's objective is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens. Connect Four is a solved game. The first player can always win by playing the right moves. Connect Four is a two-player game with perfect information for both sides, meaning that nothing is hidden from anyone. Connect Four also belongs to an adversarial, zero-sum game classification since a player's advantage is an opponent's disadvantage.

Reference Connect Four on Wikipedia

Contributing

If you're interested in contributing to the project, please read the contributing guidelines.

Recommended IDE Setup

VS Code + Svelte.

Development

Local Development

  1. Ensure that you have the latest version of Node 16 installed.
  2. If you do not have the Netlify CLI installed, follow the Getting Started with Netlify CLI guide.
  3. Run npm install
  4. Run ntl dev.

Development in Gitpod

Gitpod is an online integrated development environment (IDE); TLDR an online editor. Gitpod provides a VS Code-like experience in the browser.

To load the project, first fork this project to your own account, and then from the fork, e.g. https://github.com/some-user/connect-four, you can load it in Gitpod by prepending the URL with https://gitpod.io/#, e.g. https://gitpod.io/#https://github.com/some-user/connect-four

It'll take a minute to load up.

Gitpod loading animation

Gitpod will prompt to open in VS Code. Click the X in the top right of the prompt.

Prompt to open Gitpod container in VS Code

Gitpod will prompt you to install the Svelte for VS Code extension. Click the Install button.

Prompt asking to install the Svelte for VS Code extensionIt will install all npm packages for the project. Once all the dependencies are installed, it will load the project by running ntl dev and the app will appear in development mode.

Connect Four project loaded in Gitpod

From there, you can start developing like you would if working on your local machine's IDE.

Development in CodeSandbox

CodeSandbox is a popular online code editor that works well for creating small web applications. You can use CodeSandBox right in the browser while you work on your code contributions to the connect-four repository.

To get started, you will need to sign in or signup for a CodeSandbox account. Once you are logged in, go to the connect-four CodeSandbox repo URL.

You should see a complete list of files, a README and the preview window. connect four CodeSandbox repo

In the upper right hand corner, click on the Branch dropdown and choose the "Fork project" option. This will create your own copy of the connect-four repository on CodeSandbox.

CodeSandbox fork a project

You will then be asked to create a name for your forked repository.

CodeSandbox create name for forked repo

When you click on the "Create new fork" button, it will create a new forked copy of the connect-four repository. From there, you can create a new branch by clicking on the Branch button in the upper right hand corner to start working on contributing to the repo.

You might also see a message like this to install GitHub Apps which helps you run your development server on CodeSandbox.

CodeSandbox GitHub apps install

Once you make some changes, you can commit and push up your work and create a PR by using the Git tools located in the left hand corner of the screen.

Git tools in CodeSandbox

connect-four's People

Contributors

dependabot[bot] avatar nickytonline avatar muckitymuck avatar narigo avatar pedaars avatar codekage25 avatar carmenkolohe avatar gentlegiantdev avatar jdwilkin4 avatar loganarnett avatar tamalchowdhury avatar jocrah avatar raykotab avatar

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.