https://github.com/tomasiser/mff-battlecode
KSTTForTheWin
https://github.com/tomasiser/mff-battlecode
Last synced: about 1 month ago
JSON representation
KSTTForTheWin
- Host: GitHub
- URL: https://github.com/tomasiser/mff-battlecode
- Owner: tomasiser
- Created: 2017-03-02T17:20:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T12:59:52.000Z (over 9 years ago)
- Last Synced: 2025-09-22T20:52:24.566Z (9 months ago)
- Language: Java
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
University project for the [Battlecode](https://www.battlecode.org/) competition.
**How to install:**
1. Download Battlecode files: https://github.com/battlecode/battlecode-scaffold-2017/archive/master.zip
1. Run `gradlew` and `gradlew build`
1. Clone this repository to `src/KSTTForTheWin`
## Broadcasting
```java
import KSTTForTheWin.Broadcasting.Broadcaster;
// ...
static Broadcaster broadcaster;
// ...
static void run...(RobotController rcon) throws GameActionException {
// ...
broadcaster = new Broadcaster(rcon);
```
How do I update my broadcaster?
```java
broadcaster.refresh(); // do this at the beginning of each round! it's a cheap command!
```
How to report that I found an enemy Archon?
```java
broadcaster.reportEnemyArchon(archonRobotId, location);
```
How to report that I need help?
```java
broadcaster.reportHelpNeeded(); // do not report each round!
```
How to find where the nearest situation is?
```java
MapLocation whereToGo = broadcaster.findNearestAction();
```
How do I report that the enemy Archon has died?
```java
broadcaster.reportEnemyArchonDied(archonRobotId);
```