Giter Club home page Giter Club logo

codenames's Introduction

Codenames

StyleCI Status Quality Score License: CC BY-NC-SA 4.0 Build Status Latest Version

This is the test project of the board game called Codenames. The game is written in PHP (Laravel framework), Vue.JS, SCSS. You can load it from any number of different browsers even from different device. The game support the websocket based real time synchronization between them. Due the usage of websocket the game needs installed Node.JS too.

There are two screens in the game. This is for everyone:

Screen for everyone

And this screen for the leaders:

Screen for the leaders

Install guide (Linux: Ubuntu)

Before starting the install guide be sure that PHP with sqlite support, Node.JS is intalled, and Redis server is running on your computer.

Clone the repository:

git clone https://github.com/ivanszkypeter/codenames.git

If you want to skip the following steps, do all the steps of the install with only one command:

./linux-install.sh

Navigate into the downloaded folder:

cd codenames

Install the required PHP packages:

composer install

Install the required Node.JS packages:

npm install --only=production

Create you own environment description file for Laravel:

cp .env.example .env

Generate application key for the Laravel based app:

php artisan key:generate 

Create an empty file for the sqlite database:

touch database/database.sqlite

Create the databases tables:

php artisan migrate

Put some predefined words into them:

php artisan db:seed --class=WordsTableSeeder

Install guide (Windows 10)

Before starting the install guide be sure that XAMPP, Composer, Node.JS is intalled on your computer.

If you want to skip the following steps, do all the steps of the install with only one command:

./windows-install.sh

Open a Git Bash, do all the steps from the linux installation guide and continue with these steps:

Downloaded the latest version of redis:

curl https://raw.githubusercontent.com/ServiceStack/redis-windows/master/downloads/redis-latest.zip > redis-latest.zip

Unzip the downloaded file:

unzip redis-latest -d redis

Run the application

Now the game is ready to start. The following command will start a PHP server and the same time a Node.JS server. You can specify the IP adress with the host caption, this will allow you to run your server in the local network area.

php artisan serve --host 192.168.x.x

Navigate in your favourite browser to the screen for everyone: http://192.168.x.x:8000/game/room/1

Navigate in your favourite browser to the screen for leaders: http://192.168.x.x:8000/game/room/1?role=boss

Issues in the game

This is a test project, so there are some known - planned - security issue in the game, which would cause problems in a real game :

  • Every action in any room are immediately sent to all other room (included the colors of the card), then the room check is it recipient or not.
  • Everybody can easily cheat in the game by modifying the url of the room. When you add the ?role=boss ending to the url, you will see the colors of the cards without any permission check.

License

The original board game is designed by Vladimír Chvátil, Czech Games Edition, so you are not allowed to host this application publicly.

The repository is under the license of Creative Commons.

codenames's People

Contributors

ivanszkypeter avatar scrutinizer-auto-fixer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.