LinearMilk / flax-online

Abstract boardgame implementation in JS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FLAX is an abstract board game based on Glüx from Queen Games created as a fan tribute to the game and as an easy way to play with other board layouts than provided in the original game. It was written in JavaScript to run on the client side and utilises Bootstrap.

Preview

 Screenshot - current version

Playtest current version

Status

GitHub license Codacy Badge dependencies Status devDependencies Status

Download and Installation

To run the game locally:

Installation

  • Run npm install to download dependencies.
  • Run npm install parcel-bundler -g to install parcel.js bundler.
  • Run npm run start to start the development server, the script will open the game in your default browser at http://localhost:8080/.

NPM Scripts

  • npm run start opens the project in your default browser and live reloads when changes are made
  • npm run build builds the minified version to 'dist' folder in production mode
  • npm run test runs tests using Jest

Rules

Game board

The board is divided into square tiles, which form rooms (darker areas) and paths (lighter areas). Each player has a defined starting position (first tile placement) on the board as well.

Board explanation

Players

The game is played between 2 players. Each players has at his disposal a stack of 24 double-sided chips, 8 of each of 3 types:

  • 1 or 6
  • 2 or 5
  • 3 or 4.

On their turn the player draws a random chip from their supply and places it on the board according to placement rules. If a player doesn't have a legal placement available their turn immediately ends.

Placement Rules

  • On their first turns the players have to put their chip on their respective starting tiles.
  • On subsequent turns the player can place a chip in straight line, horizontally or vertically, from any of their chips, counting the exact number of pips on the starting chip. Players cannot place a chip if their way is blocked, either by their own chip or their opponent's.
  • If the destination square already contains a chip (their own or their opponent's), player can put a chip on top of existing chip covering it. This can only be done once per square, that is a stack of chips never can be higher than two. The bottom chip is not counted for movement or scoring anymore.
  • Players never can place a chip on their opponent's starting tile.
  • Players cannot skip moves, if a valid move exist for current player, they must make it.
  • Once per game a player may place another chip on top of their starting chip.

Examples

placement example

placement example

placement example

Scoring

Players earn 4 points for every room in which they have the most pips (combined on all their chips). If the players are tied, both of them get the points. If at the end of the game players are tied for victory, the player with more pips in the central room is the winner. If the players are tied still, they share the victory.

Bugs and Issues

Have a bug or an issue with this template? Open a new issue here on GitHub.

About

Flax has been created as a challenge to ourselves and as a tribute to the game we like very much. It is based on Glüx, if you like it please buy Glüx and support people who made it.

Team working on Flax:

About

Abstract boardgame implementation in JS.

License:MIT License


Languages

Language:JavaScript 89.9%Language:HTML 8.0%Language:CSS 2.1%