GithubHelp home page GithubHelp logo

wsa-2002 / online-mine-sweeper Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.14 MB

A final project for Computer Network and Applications in NTU

Shell 0.08% Go 30.39% HTML 2.19% CSS 18.48% JavaScript 48.51% Dockerfile 0.34%

online-mine-sweeper's Introduction

111-1 CN Final Project: 2 Player Online Minesweeper

by amber, erica, jtc, daphne, wsa

About This Project

This is a 2 Player Online Minesweeper. You can either create an empty room and invite your friend, enter a random room, or join a specific room that your friend has created. Players take turns to either take a step or place a flag. In addition to original features of Minesweeper, we add timer into our game, to make the competition more thrilled. Enjoy the match!

Setup

Backend & Database Setup

cd be
cp .env.example .env
cp docker-compose.yaml.example docker-compose.yaml

Fill in necessary environment variables in .env.

MONGO_URI="mongodb://root:[email protected]:27017"
DATABASE="network-project"
SERVICE_ADDRESS=":8000"

Then run

docker-compose up --build -d

You may check whether the database is up from localhost:8082, and the websocket connection endpoint is ws://<SERVICE_ADDRESS>/socket

Frontend Setup

cd fe
cp .env.example .env

Fill in the below environment variable in .env.

REACT_APP_ClIENT_ADDRESS="ws://localhost:8000/socket"

Then run

yarn start

How to start and play

Open http://localhost:3000.

online-mine-sweeper's People

Contributors

wsa-2002 avatar corneliaaaaaaa avatar yyl14 avatar jtongchenzip avatar daphneeeee avatar

Stargazers

 avatar

Watchers

 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.