Skip to content

Commit

Permalink
Merge pull request #81 from battlecode/client-nathan-tweaks-3
Browse files Browse the repository at this point in the history
Client nathan tweaks 3
  • Loading branch information
n8kim1 authored Jan 5, 2023
2 parents fd94c4f + 2c72b62 commit 20cf893
Show file tree
Hide file tree
Showing 321 changed files with 11,232 additions and 6,571 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
# RELEASE_ARTIFACT_ID is the name of the Maven artifact produced by the buildsystem.
# Important: you must make sure no ID is a prefix of a different ID. Otherwise, you could
# inadvertently cause unintended episodes to become public.
RELEASE_ARTIFACT_ID: battlecode22
RELEASE_ARTIFACT_ID: battlecode23

# IS_PUBLIC is whether to release deployments publicly. Set to exactly the text "YES" to do so.
IS_PUBLIC: NO
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Battlecode 2022
# Battlecode 2023

🚩

Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ publishing {
publications {
server(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22'
artifactId 'battlecode23'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact release_main
Expand All @@ -190,39 +190,39 @@ publishing {

clientWin(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22-client-win'
artifactId 'battlecode23-client-win'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact releaseClientWin
}

clientMac(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22-client-mac'
artifactId 'battlecode23-client-mac'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact releaseClientMac
}

clientLinux(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22-client-linux'
artifactId 'battlecode23-client-linux'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact releaseClientLinux
}

clientWin32(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22-client-win-32'
artifactId 'battlecode23-client-win-32'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact releaseClientWin32
}

clientLinux32(MavenPublication) {
groupId 'org.battlecode'
artifactId 'battlecode22-client-linux-32'
artifactId 'battlecode23-client-linux-32'
version project.findProperty('release_version') ?: 'NONSENSE'

artifact releaseClientLinux32
Expand Down
2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ 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`, `npm run prod-test`
* `npm run clean`: Cleans `dist/`. (output folder of `prod`)
9 changes: 4 additions & 5 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,17 @@
"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",
"homepage": "https://github.com/battlecode/battlecode23#readme",
"dependencies": {}
}
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 20cf893

Please sign in to comment.