Giter Site home page Giter Site logo

cosmofruit / hive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shaw3257/hive

0.0 0.0 0.0 1.14 MB

Hive Board Game with Game Engine, AI, UI, and Server.

Home Page: https://playhive.herokuapp.com

JavaScript 86.83% CSS 13.05% HTML 0.10% Ruby 0.02%

hive's Introduction

About Hive

Hive is a tabletop game designed by John Yianni and published in 2001 by Gen42 Games. It's a two player turn based game where the goal is to completely surround the opposing player's queen bee. Each game piece has different ways of moving around the hexagonal grid -- More information about these movements and game rules can be found here https://www.gen42.com/download/rules/hive/Hive_English_Rules.pdf.

Development

The game engine is written in javascript with no 3rd party dependencies. It’s job is to keep game state and to emit events when moves are validated or processed.

The AI is also written in javascript with no 3rd party dependencies and is an implementation of the minimax algorithm with alpha beta pruning. It runs on the client-side in a separate thread via the Web Worker API.

The UI uses the Canvas API along with Kinetic.js to render the pieces. The hexagonal grid was constructed with good ol’e fashion trigonometry.

The hive server runs on Node.js through Socket.io on the Express framework. The decision to use Node.js was to potentially use the game engine on the server-side.

Develop Locally

Install Deps
npm install
Run Tests
npm test
Compile and Watch Assets
grunt && grunt watch
Run Server
node app/server.js
View in Browser
open http://localhost:3001

hive's People

Contributors

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