forked from ilikecats/papercats
rename files
This commit is contained in:
parent
32449da6fb
commit
2cf9221ac2
11
README.md
11
README.md
@ -20,10 +20,12 @@ After cloning this repository, run the follow commands to install dependencies a
|
||||
npm start
|
||||
```
|
||||
|
||||
You can configure the game by editing `config.json`. Remember: DO NOT EDIT THE `consts` SETTINGS UNLESS YOU KNOW WHAT YOU ARE DOING.
|
||||
|
||||
## Bots
|
||||
|
||||
```bash
|
||||
node src/bot/paper-io-bot-mode.js ws://localhost:8081
|
||||
node src/paper-io-bot.js ws://localhost:8081
|
||||
```
|
||||
|
||||
## Build
|
||||
@ -35,9 +37,9 @@ browserify client.js | uglifyjs > public/bundle.js
|
||||
|
||||
## Roadmap & TODO List
|
||||
|
||||
[ ] 多个游戏房间
|
||||
[ ] 加快渲染速度
|
||||
[ ] 优化胜负判定
|
||||
- [ ] 多个游戏房间
|
||||
- [ ] 加快渲染速度
|
||||
- [ ] 优化胜负判定
|
||||
|
||||
## License
|
||||
|
||||
@ -46,5 +48,4 @@ This is licensed under MIT. As such, please provide due credit and link back to
|
||||
Original Repo:
|
||||
|
||||
- Author: theKidOfArcrania
|
||||
|
||||
- Link: https://github.com/theKidOfArcrania/BlocklyIO
|
||||
|
@ -4,7 +4,7 @@ var io = require("socket.io-client");
|
||||
var client = require("./src/game-client");
|
||||
var config = require("./config.json")
|
||||
client.allowAnimation = true;
|
||||
client.renderer = require("./src/user-mode");
|
||||
client.renderer = require("./src/mode/mode-user");
|
||||
|
||||
var mimiRequestAnimationFrame = window.requestAnimationFrame
|
||||
|| window.webkitRequestAnimationFrame
|
||||
|
@ -3,8 +3,6 @@
|
||||
"http_port": 8080,
|
||||
"ws_port": 8081,
|
||||
"bots": [],
|
||||
// DO NOT EDIT THE FOLLOWING SETTINGS
|
||||
// UNLESS YOU KNOW WHAT YOU ARE DOING
|
||||
"consts": {
|
||||
"GRID_SIZE": 80,
|
||||
"CELL_WIDTH": 40,
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
if (process.argv.length < 3) {
|
||||
console.log("Usage: node bot-mode.js <socket-url> [<name>]")
|
||||
console.log("Usage: node bot.js <socket-url> [<name>]")
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@ -7,9 +7,9 @@ if (process.argv.length < 3) {
|
||||
//TODO: add weight to the max land area and last land area, and also the number of kills
|
||||
//TODO: genetic gene pooling
|
||||
|
||||
var core = require("../core");
|
||||
var client = require("../game-client");
|
||||
var consts = require("../../config.json").consts;
|
||||
var core = require("./core");
|
||||
var client = require("./game-client");
|
||||
var consts = require("../config.json").consts;
|
||||
|
||||
var MOVES = [[-1, 0], [0, 1], [1, 0], [0, -1]];
|
||||
|
@ -266,8 +266,7 @@ function update() {
|
||||
invokeRenderer("update", [frame]);
|
||||
}
|
||||
//Export stuff
|
||||
var funcs = [connectGame, changeHeading, getOthers, getPlayers, getUser];
|
||||
funcs.forEach(function(f) {
|
||||
[connectGame, changeHeading, getOthers, getPlayers, getUser].forEach(function(f) {
|
||||
exports[f.name] = f;
|
||||
});
|
||||
exports.renderer = null;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* global $ */
|
||||
|
||||
var core = require("./core");
|
||||
var client = require("./game-client");
|
||||
var consts = require("../config.json").consts;
|
||||
var core = require("../core");
|
||||
var client = require("../game-client");
|
||||
var consts = require("../../config.json").consts;
|
||||
|
||||
var SHADOW_OFFSET = 5;
|
||||
var ANIMATE_FRAMES = 24;
|
@ -1,11 +1,11 @@
|
||||
if (process.argv.length < 3) {
|
||||
console.log("Usage: node paper-io-bot-mode.js <socket-url> [<name>]")
|
||||
console.log("Usage: node paper-io-bot.js <socket-url> [<name>]")
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var core = require("../core");
|
||||
var client = require("../game-client");
|
||||
var consts = require("../../config.json").consts;
|
||||
var core = require("./core");
|
||||
var client = require("./game-client");
|
||||
var consts = require("../config.json").consts;
|
||||
|
||||
var MOVES = [[-1, 0], [0, 1], [1, 0], [0, -1]];
|
||||
|
Loading…
Reference in New Issue
Block a user