Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

therealsujitk/web-app-mafia

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Mafia

Mafia is a social deduction game, created by Dimitry Davidoff in 1986. The game models a conflict between two groups: an informed minority, and an uninformed majority. At the start of the game, each player is secretly assigned a role affiliated with one of these teams.

Preview

Preview 1

Preview 2

Preview 3

Preview 4

Preview 5

Requirements

  • PHP 5.6+
  • MySQL 5.2+
  • SQL table bug_reports:
CREATE TABLE bug_reports (
	id INT(255) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
	time_stamp TIMESTAMP NOT NULL,
	report VARCHAR(2000) NOT NULL
);
  • SQL table town_details:
CREATE TABLE town_details (
	town_id VARCHAR(15) PRIMARY KEY,
	time_stamp TIMESTAMP NULL,
	town_name VARCHAR(50) NOT NULL,
	mob_name VARCHAR(50) NOT NULL,
	has_started INT (2) DEFAULT 0 NOT NULL,
	game_index INT(2) DEFAULT 0 NOT NULL,
	daily_index INT(2) DEFAULT 0 NOT NULL,
	daily_max INT(2) DEFAULT 2 NOT NULL
);
  • SQL table statistics:
CREATE TABLE statistics (
	id INT(1) DEFAULT 1 NOT NULL,
	players_joined INT(255) DEFAULT 0 NOT NULL,
	games_played INT(255) DEFAULT 0 NOT NULL
);
  • SQL insert into statistics
INSERT INTO statistics (id, players_joined, games_played) VALUES ('1', '0', '0');

Dependencies

$ npm install
$ composer install

Usage

Run the following command to start the server that sends and receives messages.

$ php bin/server.php

Built by