Skip to content

Commit

Permalink
Merge branch 'engine-client-interactions-merged2' into engine-plus-cl…
Browse files Browse the repository at this point in the history
…ient-test-87
  • Loading branch information
n8kim1 committed Jan 7, 2023
2 parents 2442a87 + e1ae808 commit 3d970bd
Show file tree
Hide file tree
Showing 256 changed files with 6,759 additions and 5,417 deletions.
3 changes: 2 additions & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ This NPM module does not have any dependencies or meaningful output, but it is f
* `npm run build`, `npm run build-playback`
* `npm run electron`: Run the client in electron. You might want to run this most of the time.
* `npm run watch`: Watch for the changes of `visualizer`. Note that it *does not watch* `playback`.
* `npm run prod-electron`, `npm run prod-electron-no-sign`, `npm run prod-test`
* `npm run prod-electron`: Builds production versions of electron clients, for many OS's. Note that this will probably not work if run on your local machine, but it should work in our production build-and-release environment, which is on GitHub Actions / CI.
* `npm run prod-test`: Builds a production version of the electron client for your local machine's OS.
* `npm run clean`: Cleans `dist/`. (output folder of `prod`)
47 changes: 0 additions & 47 deletions client/deploy-web-client.sh

This file was deleted.

12 changes: 10 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "battlecode-client",
"version": "2022.0.0",
"version": "2023.0.0",
"description": "Client wrapper of visualizer and playback",
"main": "visualizer/electron-main.js",
"scripts": {
Expand All @@ -12,18 +12,16 @@
"electron": "npm run build-playback && (cd visualizer && npm run electron)",
"watch": "npm run build-playback && (cd visualizer && npm run watch)",
"prod-electron": "npm run build-playback && (cd visualizer && npm run prod-electron)",
"prod-electron-no-sign": "npm run build-playback && (cd visualizer && npm run prod-electron-no-sign)",
"prod-test": "npm run build-playback && (cd visualizer && npm run prod-test)"
},
"repository": {
"type": "git",
"url": "git+https://github.com/battlecode/battlecode21.git"
"url": "git+https://github.com/battlecode/battlecode23.git"
},
"author": "Teh Devs",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/battlecode/battlecode21/issues"
"url": "https://github.com/battlecode/battlecode23/issues"
},
"homepage": "https://github.com/battlecode/battlecode21#readme",
"dependencies": {}
"homepage": "https://github.com/battlecode/battlecode23#readme"
}
8 changes: 4 additions & 4 deletions client/playback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Remember to run `npm install` without any serious errors in this directory.

* `npm run check`: Compile typescript files (`src/*.ts`) without creating any output files, and pipe output to less. Use this command when you need to update playback for new schema.
* `npm run build`: Compile typescript files (`src/*.ts`) into javascript & typescript declaration files. (`out/*.js`, `out/*.d.ts`)
* `npm run gen`: Generate dummy `.bc22` files. It runs typescript without transcripting into javascript, by using `ts-node`. (`../examples`)
* `npm run gen`: Generate dummy `.bc23` files. It runs typescript without transcripting into javascript, by using `ts-node`. (`../examples`)
* `npm run clean`: Simply remove itself and everything in `out` directory.
* `npm run watch`: Watch for chanages on `src/*.ts` files, and build again whenever change is detected.

Expand All @@ -34,11 +34,11 @@ The other scripts are under maintenance.
### Structure
* `src/*.ts` : main source files. `index.ts` is the starting point
* `src/tsconfig.json` : TypeScript compile option configuration file
* `src/gen/create.ts` : code for generating dummy `.bc22` files.
* `src/gen/create.ts` : code for generating dummy `.bc23` files.
* `src/legacy/**/*.ts` : Legacy codes, including test for soa.ts and simulating
* `out/*.js` : compiled javascript output of typescript files
* `out/*.d.ts` : compiled typescript declaration files of typescript files
* `../examples` : generated `.bc22` files from `src/gen/*`
* `../examples` : generated `.bc23` files from `src/gen/*`


### Note
Expand Down Expand Up @@ -68,7 +68,7 @@ const bc = require('battlecode-playback');
let aliveRobots = {};
let lifetimes = [];

bc.stream('match.bc22').on('spawn', spawnEvent => {
bc.stream('match.bc23').on('spawn', spawnEvent => {
aliveRobots[spawnEvent.bodyId] = {
born: spawnEvent.round
};
Expand Down
Loading

0 comments on commit 3d970bd

Please sign in to comment.