Skip to content

grciprian/dice-war

Repository files navigation

dice-war

Dice War is a local game between two players.
The game's scope is to conquer terrain. The game ends when there is no more terrain left to be conquered. The player with the most conquered terrain at the end of the game wins.

RULES:
-roll two dice;
-the player with the highest rolled dice starts;
-continue rolling dice;
-make a rectangle with the sides generated;
-you cannot block unconquered terrain from the other player;
-the first player's first rectangle is placed in the indicated corner. The second player first rectangle in the opposing corner;
-the rectangle must be connected to your existing territory;
-if your dice are equal you can either make a rectangle with those sides generated or a 1 x 1 rectangle;
-if you cannot make the generated rectangle you skip your turn;
-when all space is filled the game ends;
-the one with the most territory wins.

To set up the website, create a database named 'dicewar' then create a table with the following sql command:
CREATE TABLE players (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
nickname varchar(30) NOT NULL,
password varchar(40) NOT NULL,
email varchar(100) NOT NULL,
experience int(7) unsigned DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE KEY nickname (nickname)
);
I used phpmyadmin for the database setup.

About

An in-browser dice-war game made with HTML, CSS and JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published