• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

shaw3257/hive: Hive Board Game with Game Engine, AI, UI, and Server.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

shaw3257/hive

开源软件地址:

https://github.com/shaw3257/hive

开源编程语言:

JavaScript 86.8%

开源软件介绍:

https://playhive.herokuapp.com/

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

Game Engine - https://github.com/shaw3257/hive/blob/master/lib/board.js

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.

AI - https://github.com/shaw3257/hive/blob/master/lib/ai.js

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.

UI - https://github.com/shaw3257/hive/blob/master/app/assets/javascripts/game/board/board-ui.js

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.

Server - https://github.com/shaw3257/hive/blob/master/app/server.js

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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap