├── .gitignore ├── .ivy ├── ivy-2.4.0.jar └── ivysettings.xml ├── README.md ├── build.xml ├── ide ├── eclipse │ ├── .classpath │ ├── .externalToolBuilders │ │ ├── Battlecode Ant Builder.launch │ │ ├── Jar Team For Upload.launch │ │ ├── Map Editor.launch │ │ ├── Print Version.launch │ │ ├── Run Battlecode Client.launch │ │ ├── Run Battlecode Headless.launch │ │ ├── Run Battlecode Tests.launch │ │ ├── Update Battlecode.launch │ │ └── org.eclipse.jdt.core.javabuilder.launch │ ├── .gitignore │ ├── .project │ └── .settings │ │ ├── org.eclipse.jdt.core.prefs │ │ └── org.eclipse.jdt.ui.prefs └── intellij │ ├── .gitignore │ ├── .idea │ ├── .gitignore │ ├── .name │ ├── ant.xml │ ├── compiler.xml │ ├── copyright │ │ └── profiles_settings.xml │ ├── encodings.xml │ ├── libraries │ │ └── Battlecode_Dependencies.xml │ ├── misc.xml │ ├── modules.xml │ ├── runConfigurations │ │ ├── Battlecode_Client.xml │ │ ├── Battlecode_Headless.xml │ │ ├── Jar_Player__set_team__View___Tool_Windows___Ant_Build___Battlecode_2016_Scaffold___Properties___Execution_.xml │ │ ├── Map_Editor.xml │ │ ├── Print_Version.xml │ │ └── Update_Battlecode.xml │ └── vcs.xml │ ├── Battlecode Player.iml │ └── Battlecode │ └── Battlecode.iml ├── ivy.xml ├── maps └── .gitignore ├── src └── examplefuncsplayer │ └── RobotPlayer.java └── test └── examplefuncsplayer └── RobotPlayerTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # player jars 4 | *.jar 5 | 6 | # keep ivy jar 7 | !.ivy/ivy-2.4.0.jar 8 | 9 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 10 | hs_err_pid* 11 | 12 | # temporary folders 13 | lib/ 14 | bin/ 15 | 16 | matches/ 17 | 18 | # unneeded eclipse info 19 | .metadata/ 20 | 21 | # files being edited 22 | *.tmp 23 | *.bak 24 | *.swp 25 | *~ 26 | -------------------------------------------------------------------------------- /.ivy/ivy-2.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/battlecode/battlecode-scaffold/97c3d29b002d3c97267dbc061176d13e6288af06/.ivy/ivy-2.4.0.jar -------------------------------------------------------------------------------- /.ivy/ivysettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Battlecode Project Scaffold 2 | =========================== 3 | 4 | Here you'll find (almost) everything you need to write players for Battlecode 5 | 2016. 6 | 7 | Other documentation and resources can be found at: https://www.battlecode.org/ 8 | 9 | 10 | ## Overview 11 | 12 | ### Project structure 13 | 14 | - `README.md` 15 | This file. 16 | - `build.xml` 17 | The Ant build file used to build and run players. 18 | - `ivy.xml` 19 | The Ivy file used to find and download dependencies 20 | - `bc.conf` 21 | The battlecode configuration file containing user settings. 22 | - `src/` 23 | Player source code 24 | - `test/` 25 | Player test code 26 | - `lib/` 27 | Dependencies directory 28 | - `bin/` 29 | The output directory for builds; can be safely ignored 30 | - `.ivy/` 31 | An extra directory containing ivy resources; can be safely ignored 32 | 33 | 34 | ### How does Battlecode work? 35 | 36 | The Battlecode software consists of three major components: 37 | 38 | - The player library/API: these are the classes that you will import and build 39 | against when writing a player. 40 | 41 | - The server: this is the software that computes Battlecode matches. For most 42 | users, the server will run transparently, so you don't have to worry about it. 43 | However, advanced server setups are possible, allowing you to compute matches 44 | on one machine and view them on another. 45 | 46 | - The client: this is the software that displays Battlecode matches. For most 47 | users, the client will automatically create a server for running a match and 48 | display that match as it computes. The client also plays match files like 49 | those from scrimmage matches and the tournaments. 50 | 51 | This project scaffold handles installing and running these components using Ant 52 | and Ivy. 53 | 54 | 55 | ### What is Ant? 56 | 57 | Apache Ant is a Java-based build system similar in theory to UNIX `make`. 58 | 59 | You can run it from a terminal or from an IDE; instructions are below. 60 | 61 | You can find Ant's documentation at: http://ant.apache.org/ 62 | 63 | You are not required to use the Ant build script, but you should probably at 64 | least read it to get an idea of how things work. 65 | 66 | 67 | ### What is Ivy? 68 | 69 | Apache Ivy is a "dependency manager" that integrates well with Ant. It handles 70 | finding and downloading "dependencies": resources that a project needs to build 71 | and run. 72 | 73 | The Ant build file handles loading and invoking Ivy; you shouldn't have to 74 | concern yourself with it, unless you want to add more dependencies for some 75 | reason. 76 | 77 | You can find Ivy's documentation at: http://ant.apache.org/ivy/ 78 | 79 | 80 | ## Getting started 81 | 82 | First, you'll need a Java Development Kit compatible with Java 8 or later. 83 | 84 | You can find JDK installers at: 85 | http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 86 | 87 | Alternatively, you can install a JDK yourself using your favorite package 88 | manager. Make sure it's an Oracle JDK - we don't support anything else - 89 | and is compatible with Java 8. 90 | 91 | If you're unsure how to install the JDK, you can find instructions for 92 | all operating systems here: 93 | https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html 94 | Pay careful attention to anything about setting up your `PATH` or `CLASSPATH`. 95 | 96 | Next, you'll need to choose how you want to work on battlecode - using an 97 | IDE, using a terminal, or mixing and matching. 98 | 99 | 100 | ### Using Eclipse 101 | 102 | - Install and open the latest version of Eclipse: 103 | http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1 104 | 105 | - Create a new Eclipse workspace. The workspace should NOT contain the 106 | battlecode-scaffold folder. 107 | 108 | - Run `File -> Import...`, and select `General / Existing Projects Into 109 | Workspace` 110 | 111 | - In the `Select root directory` field, navigate to `battlecode-scaffold/ide/eclipse`. 112 | Note: DO NOT select just `battlecode-scaffold` as the root directory; you have 113 | to select `battlecode-scaffold/ide/eclipse`. 114 | Finish importing the project. 115 | 116 | - Click the dropdown arrow next to the `External Tools` icon (a play button with 117 | a toolbox). You should see a set of tasks our build file can run. 118 | 119 | - Run `Update Battlecode`. 120 | 121 | - You're good to go; you can run other ant tasks using the other `External Tools` 122 | targets. 123 | 124 | - If you don't see what you're looking for the dropdown, click `External Tools 125 | Configurations` in the dropdown, and then expand `Ant Build` on the left. You 126 | should be able to see the different run options. Pick The one you want and then 127 | press `Run`. This will add it to the dropdown for future runs. 128 | 129 | #### Caveats 130 | 131 | - The Eclipse project is a slightly odd configuration, since it's not stored in 132 | the base of the project. All files are *links* to `${BATTLECODE_LOC}/filename`. 133 | Launch configurations have to use `${project_loc:battlecode-scaffold}/../..`, 134 | since they can only access string variables. 135 | 136 | - If you rename or add jar files to the lib directory, Eclipse gets confused. 137 | You'll need to re-add them using `Project / Properties / Java Build Path`. 138 | 139 | ### Using IntelliJ IDEA 140 | - Install IntelliJ IDEA Community Edition: 141 | https://www.jetbrains.com/idea/download/ 142 | 143 | - In the `Welcome to IntelliJ IDEA` window that pops up when you start IntelliJ, 144 | select `Open` (NOT `Import project` or `Create new project`) 145 | 146 | - In the `Open File or Project` window, select `battlecode-scaffold/ide/intellij` 147 | (NOT just `battlecode-scaffold`). 148 | 149 | - Select the `Update Battlecode` ant target in the run configurations box (a 150 | rounded rectangle next to a green triangle) and run it (using the green 151 | triangle). You can also run it using the `Run / Run...` menu option. 152 | 153 | - You're good to go; you can run other ant tasks using the other run 154 | configurations, or using the `Ant Build` tool window (accessible from 155 | `View / Tool Windows / Ant Build`) 156 | 157 | 158 | ### Using a terminal 159 | 160 | - Install Apache Ant, the build tool used in the project. You can do it 161 | manually: http://ant.apache.org/manual/install.html#getting 162 | Or, you can use your favorite package manager. 163 | 164 | On every system you will need to set the `JAVA_HOME` environment variable to 165 | point to the installation path of your JDK. 166 | 167 | You may also need the `ANT_HOME` environment variable in some cases. Just set 168 | this to be the path to your ant installation and you should be good to go. 169 | 170 | - Navigate to the root directory of the project, and run `ant update`. 171 | 172 | - You're good to go. Run `ant -p` to see the other ant build 173 | tasks available. 174 | 175 | 176 | ## Writing Players 177 | 178 | The included `build.xml` file allows you to compile your player and prepare it 179 | for submission without having to worry about the Java classpath and other 180 | settings. To take advantage of this, simply place the source code for your 181 | player(s) in a subdirectory of `src` folder in your Battlecode installation 182 | directory. 183 | 184 | For instance, if you are team #1, you'd have a folder called `team001` in your 185 | `src` folder, and in `team001` you'd have `RobotPlayer.java` (with package 186 | `team001`), etc. 187 | 188 | You can also have other folders, if you want to work on multiple players at once. 189 | However, only the `teamXXX` player can be submitted for your team. 190 | 191 | Building after running this might help resolve issues with version changes. 192 | 193 | ## Running Matches 194 | 195 | ### Local 196 | 197 | Local matches are the most common way to run a match - they are computed and 198 | rendered simultaneously on the same machine. Invoke the ant `run` target to run 199 | a local match, using the command line or an IDE. For the IDE, pick `Battlecode 200 | Client` the same way you picked `Update Battlecode`. 201 | 202 | A dialog box will appear that allows you to choose the teams and maps to run. 203 | The teams and maps that appear in the dropdown boxes are those that the software 204 | knows about at runtime. If the team or map you're trying to run does not appear 205 | in the dropdown box, it isn't on your classpath or map path. 206 | 207 | When running a local match, you also have the option of saving the match to a 208 | file so that you can play it back without having to recompute it. To do this, 209 | check the `Save match to file` box on the main dialog and choose the location of 210 | the file. Note that the file will be overwritten if it already exists. 211 | 212 | If you're not using Ant, you can run the `battlecode.client.Main` class from the 213 | command line or an IDE. You should pass an argument `-c [CONF_FILE]` to point it 214 | at a battlecode configuration file. 215 | 216 | #### Client Basics 217 | 218 | After you start your match, you should see a map with a bunch of robots on it. 219 | The top left has controls for playing through the game: playing, pausing, skipping 220 | to a certain round, etc. 221 | 222 | You can click on a robot to get its detailed information. Details about that robot 223 | will show up on the top panel, such as its bytecode usage and its indicator strings. 224 | You can also hover over a map tile to get information about its location and the number 225 | of parts and rubble on that tile. 226 | 227 | The left pane shows the number of units of each type. In addition, there are four bars. 228 | The first and third bars show how many parts each team has. The second and fourth bars 229 | display the total part values of the red and blue armies. This value is computed by 230 | summing the part cost of each team's robots and is meant to be used as an indicator of 231 | which team has the stronger army. 232 | 233 | Some basic animations: 234 | - colored lines represent attacks 235 | - purple rings represent broadcasts 236 | - circles on the map indicate parts 237 | - the darkness of a map tile represents how much rubble there is 238 | - brackets around a unit indicate infection (green = zombie, purple = viper) 239 | 240 | There are also a number of keyboard shortcuts below that you can use to play around 241 | with the cilent. 242 | 243 | ### Headless matches 244 | 245 | Headless matches run a match without viewing it - they run the server without 246 | the client. Invoke the ant `headless` command to run a headless match. 247 | 248 | You can edit `bc.conf` to change the players and maps run during a headless 249 | match, or supply ant with a `-Dbc.conf=[CONF_FILE]` argument to use 250 | another battlecode configuration file. 251 | 252 | If you're not using Ant, you can run the `battlecode.server.Main` class from the 253 | command line or an IDE. You should pass an argument `-c [CONF_FILE]` to point it 254 | at a battlecode configuration file. 255 | 256 | 257 | ### Playing Back from a File 258 | 259 | If you have a match file that you'd like to play back (i.e., from saving one 260 | previously) you can choose "Play back from match file" and choose the match file 261 | to play back. The remainder of the dialog settings will be ignored. 262 | 263 | These match files have the extension `.rms`. You can play back scrimmage match files 264 | that are downloaded from the website. 265 | 266 | 267 | ### Match Sets 268 | 269 | This year, each match between two teams consists of a set of games. To run 270 | multiple games in a match, use the add and remove buttons below the map dropdown 271 | box to add maps to the list. A game will be played on each map in the list, in 272 | order. If you don't add any maps, the match will consist of one game, on the map 273 | selected in the dropdown box. 274 | 275 | 276 | ## Debugging your Player 277 | 278 | Normally, the software computes the match well ahead of what is being currently 279 | viewed. However, selecting "compute and view match synchronously" from the match 280 | dialog puts the software in "lockstep mode", where the computation and viewing 281 | move in lockstep. This is generally slower than running them independently, but 282 | it allows for some interesting debugging features. 283 | 284 | While in lockstep mode, right-clicking on an open square in the map brings up a 285 | menu that lets you add new units to the map. Right-clicking on an existing unit 286 | allows you to set its control bits, which the robot's player can query and react 287 | to. You can also drag-and-drop units on the map. 288 | 289 | These debugging features are intended to help you test your robots in situations 290 | that might otherwise be hard to get them into (e.g., what happens if one of my 291 | archons gets cut off from the rest...?). However, if the players are not written 292 | defensively, these unexpected manual changes can interfere with their control 293 | logic. Keep this in mind when using the debugging features. 294 | 295 | Also, during the tournament and scrimmages, you will not be able to manually 296 | affect the game in this way. 297 | 298 | 299 | ## Uploading your Player 300 | 301 | You should upload a zip or jar file containing your team's source code. 302 | 303 | First, your player must use the package name `teamXXX` where XXX is your team number. 304 | This means that the first line of every Java file should be in the format `package teamXXX;`. 305 | 306 | Next, there are four ways to generate the zip or jar file to upload: 307 | 308 | 1. You can build this jar automatically using the command `ant -Dteam=teamXXX jar` 309 | 2. You can create a zip file of the `src/teamXXX` directory. 310 | 3. With Eclipse, run the `Jar Team for Upload` (dropdown under play button with toolbox) 311 | and for the label, make sure to pick `teamXXX` where XXX is your team number. 312 | 4. With IntelliJ, run `Jar Player`. You first have to set your team with `Views / 313 | Tool Windows / Ant Build / Battlecode 2016 Scaffold / Properties / Execution`). 314 | 315 | Then, go to http://www.battlecode.org/contestants/upload/ and upload this file. 316 | The website will attempt to compile your program and if it succeeds, then you can 317 | go challenge other teams to scrimmages. 318 | 319 | ## Maps 320 | 321 | This year, the map files (the XML map files) are packaged into the battlecode jar. 322 | You can access the map files at 323 | https://github.com/battlecode/battlecode-server/tree/master/src/main/battlecode/world/resources 324 | if you are curious. In addition, you can write your own maps and place them in 325 | the `maps` folder. Any maps placed there will be discovered by the client. For more help 326 | about how to write your own map files, check the specs. 327 | 328 | We recommend using the map editor to create maps. To run the map editor, use `ant mapeditor` 329 | or run `Map Editor`. This will open up a map editor. There are video lecture tutorials on 330 | how to use the map editor. The map editor at the moment does not allow you to specify 331 | the zombie spawn schedule, so you will have to insert that yourself into the XML file 332 | after the XML file has been created. 333 | 334 | ## Advanced Configuration 335 | 336 | The Battlecode distribution includes a configuration file, `bc.conf`, that 337 | allows you to tweak some of the software's settings. Appendix A contains a 338 | listing of configurable properties. 339 | 340 | The properties can also be set in any way that Java properties are set. This 341 | includes using `-D[property]=[value]` on the `java` or `ant` command line. 342 | 343 | 344 | ## Appendix A: Configuration Properties and Command-line Arguments 345 | 346 | ### Computation Throttling 347 | 348 | When running a local match, the game engine attempts to periodically delay to 349 | prevent starving the match viewer of CPU time. Altering the following two 350 | settings may yield better local match performance: 351 | 352 | - `bc.server.throttle`: determines how to delay match computation; can be set to 353 | either "yield" or "sleep" 354 | - `bc.server.throttle-count`: the number of rounds between sleep/yield 355 | 356 | 357 | ### Engine Settings 358 | 359 | The following settings can be used to enable or disable certain aspects of the 360 | engine. 361 | 362 | - `bc.engine.silence-a` and `bc.engine.silence-b`: "true" or "false"; whether or 363 | not the engine will suppress printouts for the appropriate team 364 | - `bc.engine.gc`: "true" or "false"; whether or not to periodically force 365 | garbage collection in the game engine -- this option causes decreased 366 | performance but may help if the virtual machine runs out of memory during 367 | computation 368 | - `bc.engine.gc-rounds`: how many rounds between forced invocation of the 369 | garbage collector; the default is 50 370 | - `bc.engine.upkeep`: "true" or "false"; if "false", the engine will not charge 371 | units their energon upkeep each round 372 | - `bc.engine.breakpoints`: "true" or "false"; if "false", the engine will skip 373 | breakpoints in player code 374 | 375 | 376 | ### Client Settings 377 | - `bc.game.renderprefs2d`: preferences for the 2d client. For example, if 378 | you wanted to turn off the rendering of broadcasts and gridlines, you could 379 | set this property to "bg". See the "Shortcut Keys" section for a complete 380 | listing of toggles. 381 | 382 | 383 | ### Miscellaneous Settings 384 | 385 | - `bc.game.map-path`: the folder in which to look for map files (aside from the 386 | ones packaged into the battlecode software) 387 | - `bc.dialog.skip`: "true" or "false"; whether or not to show the setup dialog 388 | when the software is started. If "true", the parameters most recently entered 389 | into the dialog will be used. 390 | 391 | 392 | ### Client Settings 393 | 394 | - `bc.client.renderprefs2d`: A list of toggles to set in the 2D client. 395 | (See Shortcut Keys below.) For example, if you want to turn off broadcasts, 396 | grid lines, and transfers, you would set `bc.client.renderprefs2d=bgt`. 397 | - `bc.client.sound-on`: "true" or "false"; whether or not to play sound 398 | effects. 399 | 400 | 401 | ### Shortcut Keys 402 | 403 | | Key | Effect 404 | |-----|-------- 405 | | A | Toggle between detailed and non-detailed client view 406 | | B | Toggle unit broadcasts 407 | | D | Toggle discrete movement mode 408 | | E | Toggle HP bars 409 | | F | Toggle fast forward 410 | | G | Toggle grid lines 411 | | H | Toggle action lines 412 | | I | Rewind 50 rounds 413 | | J | Toggle slow mo 414 | | L | Toggle infection indicators 415 | | K | Toggle attack lines 416 | | R | Show attack/sight ranges when examining a unit 417 | | S | Skip 100 rounds 418 | | U | Toggle parts 419 | | V | Toggle indicator dot/line display (none, one team, both teams) 420 | | X | Toggle unit explosions 421 | | / | Find unit by ID 422 | | < | Pause 423 | | > | Pause 424 | | Esc | Quit 425 | 426 | 427 | ## Scala 428 | 429 | Most contestants choose to write their players in Java, but we also support 430 | Scala (or a mix of Java and Scala). If you want to use Scala, simply add a 431 | .scala file to any of your players or tests, and re-run `ant update`. 432 | Everything you need should now be installed. 433 | 434 | ### Scala with Eclipse 435 | 436 | To run Scala with Eclipse, you'll want to install the Scala IDE Plugin for 437 | Eclipse: http://scala-ide.org/download/current.html 438 | 439 | Make sure you install it using `Help / Install New Software`. 440 | 441 | Things should just work, although you may have trouble running the different 442 | `New Scala ` wizards in battlecode-scaffold, because it is not 443 | configured as a scala project. To fix this, just make new scala files using 444 | the `New / File` option, and name them whatever you want your scala files to be 445 | named. 446 | 447 | ## Scala with IntelliJ 448 | 449 | To use Scala with IntelliJ, make sure you have the Scala plugin installed and 450 | enabled: 451 | https://plugins.jetbrains.com/plugin/?id=1347 452 | 453 | When you start editing files, it will probably yell at you about "No Scala SDK 454 | In Module". To fix this, click the link next to the error, and add the auto- 455 | configured SDK. You can also add a scala SDK in `File / Project Structure / 456 | Battlecode / Dependencies`; note that the resources for one should be installed 457 | in the `lib` folder. 458 | -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | 11 | Build file for Battlecode 2016 players. 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 70 | 71 | 72 | 73 | 74 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 109 | 110 | 111 | 112 | 113 | 114 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 124 | 125 | 126 | 127 | 128 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | Run as "ant run -Dteam-a=examplefuncsplayer -Dteam-b=bananas -Dmaps=simple,shrine" 146 | Don't put spaces in between the maps. 147 | Or just use the client. 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | Run as "ant -Dteam=name jar" where "name" is a folder in your teams folder. 200 | 201 | 202 | 203 | You can't jar a team that doesn't exist! 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | -------------------------------------------------------------------------------- /ide/eclipse/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Battlecode Ant Builder.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Jar Team For Upload.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Map Editor.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Print Version.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Run Battlecode Client.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Run Battlecode Headless.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Run Battlecode Tests.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/Update Battlecode.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ide/eclipse/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ide/eclipse/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | -------------------------------------------------------------------------------- /ide/eclipse/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | battlecode-scaffold 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.ui.externaltools.ExternalToolBuilder 10 | full,incremental, 11 | 12 | 13 | LaunchConfigHandle 14 | <project>/.externalToolBuilders/Battlecode Ant Builder.launch 15 | 16 | 17 | 18 | 19 | org.eclipse.ui.externaltools.ExternalToolBuilder 20 | full,incremental, 21 | 22 | 23 | LaunchConfigHandle 24 | <project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jdt.core.javanature 31 | 32 | 33 | 34 | .gitignore 35 | 1 36 | $%7BBATTLECODE_LOC%7D/.gitignore 37 | 38 | 39 | README.md 40 | 1 41 | $%7BBATTLECODE_LOC%7D/README.md 42 | 43 | 44 | bc.conf 45 | 1 46 | $%7BBATTLECODE_LOC%7D/bc.conf 47 | 48 | 49 | build.xml 50 | 1 51 | $%7BBATTLECODE_LOC%7D/build.xml 52 | 53 | 54 | ivy.xml 55 | 1 56 | $%7BBATTLECODE_LOC%7D/ivy.xml 57 | 58 | 59 | lib 60 | 2 61 | $%7BBATTLECODE_LOC%7D/lib 62 | 63 | 64 | src 65 | 2 66 | $%7BBATTLECODE_LOC%7D/src 67 | 68 | 69 | test 70 | 2 71 | $%7BBATTLECODE_LOC%7D/test 72 | 73 | 74 | 75 | 76 | BATTLECODE_LOC 77 | $%7BPARENT-2-PROJECT_LOC%7D 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ide/eclipse/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false 3 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 4 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 5 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 6 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 7 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 8 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 9 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0 10 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 11 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 12 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 13 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 14 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 15 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 16 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 17 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 18 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 19 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 20 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 21 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 22 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 23 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 24 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 25 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 26 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 27 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 28 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1 29 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0 30 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 31 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 32 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 33 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1 34 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 35 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0 36 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 37 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 38 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line 39 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line 40 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line 41 | org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line 42 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line 43 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line 44 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line 45 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line 46 | org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line 47 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line 48 | org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line 49 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line 50 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false 51 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false 52 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true 53 | org.eclipse.jdt.core.formatter.comment.format_header=false 54 | org.eclipse.jdt.core.formatter.comment.format_html=true 55 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true 56 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true 57 | org.eclipse.jdt.core.formatter.comment.format_source_code=true 58 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true 59 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true 60 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert 61 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert 62 | org.eclipse.jdt.core.formatter.comment.line_length=80 63 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true 64 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true 65 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false 66 | org.eclipse.jdt.core.formatter.compact_else_if=true 67 | org.eclipse.jdt.core.formatter.continuation_indentation=2 68 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 69 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off 70 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on 71 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false 72 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true 73 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true 74 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true 75 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true 76 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true 77 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true 78 | org.eclipse.jdt.core.formatter.indent_empty_lines=false 79 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true 80 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true 81 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true 82 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false 83 | org.eclipse.jdt.core.formatter.indentation.size=4 84 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert 85 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert 86 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert 87 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert 88 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert 89 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert 90 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert 91 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert 92 | org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert 93 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert 94 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert 95 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert 96 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert 97 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert 98 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert 99 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert 100 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert 101 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert 102 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert 103 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert 104 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert 105 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert 106 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert 107 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert 108 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert 109 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert 110 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert 111 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert 112 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert 113 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert 114 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert 115 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert 116 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert 117 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert 118 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert 119 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert 120 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert 121 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert 122 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert 123 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert 124 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert 125 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert 126 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert 127 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert 128 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert 129 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert 130 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert 131 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert 132 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert 133 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert 134 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert 135 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert 136 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert 137 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert 138 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert 139 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert 140 | org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert 141 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert 142 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert 143 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert 144 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert 145 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert 146 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert 147 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert 148 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert 149 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert 150 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert 151 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert 152 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert 153 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert 154 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert 155 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert 156 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert 157 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert 158 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert 159 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert 160 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert 161 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert 162 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert 163 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert 164 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert 165 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert 166 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert 167 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert 168 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert 169 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert 170 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert 171 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert 172 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert 173 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert 174 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert 175 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert 176 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert 177 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert 178 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert 179 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert 180 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert 181 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert 182 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert 183 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert 184 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert 185 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert 186 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert 187 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert 188 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert 189 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert 190 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert 191 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert 192 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert 193 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert 194 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert 195 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert 196 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert 197 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert 198 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert 199 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert 200 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert 201 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert 202 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert 203 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert 204 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert 205 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert 206 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert 207 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert 208 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert 209 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert 210 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert 211 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert 212 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert 213 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert 214 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert 215 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert 216 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert 217 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert 218 | org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert 219 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert 220 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert 221 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert 222 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert 223 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert 224 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert 225 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert 226 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert 227 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert 228 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert 229 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert 230 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert 231 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert 232 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert 233 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert 234 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert 235 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert 236 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert 237 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert 238 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert 239 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert 240 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert 241 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert 242 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert 243 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert 244 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert 245 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert 246 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert 247 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert 248 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert 249 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert 250 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert 251 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert 252 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert 253 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert 254 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert 255 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert 256 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert 257 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert 258 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert 259 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert 260 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert 261 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert 262 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert 263 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert 264 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert 265 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert 266 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert 267 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true 268 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true 269 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false 270 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false 271 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false 272 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false 273 | org.eclipse.jdt.core.formatter.lineSplit=120 274 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false 275 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false 276 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 277 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 278 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true 279 | org.eclipse.jdt.core.formatter.tabulation.char=tab 280 | org.eclipse.jdt.core.formatter.tabulation.size=4 281 | org.eclipse.jdt.core.formatter.use_on_off_tags=false 282 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false 283 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true 284 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true 285 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true 286 | org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter 287 | -------------------------------------------------------------------------------- /ide/eclipse/.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | cleanup.add_default_serial_version_id=true 2 | cleanup.add_generated_serial_version_id=false 3 | cleanup.add_missing_annotations=true 4 | cleanup.add_missing_deprecated_annotations=true 5 | cleanup.add_missing_methods=false 6 | cleanup.add_missing_nls_tags=false 7 | cleanup.add_missing_override_annotations=true 8 | cleanup.add_missing_override_annotations_interface_methods=true 9 | cleanup.add_serial_version_id=false 10 | cleanup.always_use_blocks=true 11 | cleanup.always_use_parentheses_in_expressions=false 12 | cleanup.always_use_this_for_non_static_field_access=false 13 | cleanup.always_use_this_for_non_static_method_access=false 14 | cleanup.convert_functional_interfaces=false 15 | cleanup.convert_to_enhanced_for_loop=false 16 | cleanup.correct_indentation=false 17 | cleanup.format_source_code=false 18 | cleanup.format_source_code_changes_only=false 19 | cleanup.insert_inferred_type_arguments=false 20 | cleanup.make_local_variable_final=true 21 | cleanup.make_parameters_final=false 22 | cleanup.make_private_fields_final=true 23 | cleanup.make_type_abstract_if_missing_method=false 24 | cleanup.make_variable_declarations_final=false 25 | cleanup.never_use_blocks=false 26 | cleanup.never_use_parentheses_in_expressions=true 27 | cleanup.organize_imports=false 28 | cleanup.qualify_static_field_accesses_with_declaring_class=false 29 | cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true 30 | cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true 31 | cleanup.qualify_static_member_accesses_with_declaring_class=true 32 | cleanup.qualify_static_method_accesses_with_declaring_class=false 33 | cleanup.remove_private_constructors=true 34 | cleanup.remove_redundant_type_arguments=true 35 | cleanup.remove_trailing_whitespaces=false 36 | cleanup.remove_trailing_whitespaces_all=true 37 | cleanup.remove_trailing_whitespaces_ignore_empty=false 38 | cleanup.remove_unnecessary_casts=true 39 | cleanup.remove_unnecessary_nls_tags=true 40 | cleanup.remove_unused_imports=true 41 | cleanup.remove_unused_local_variables=false 42 | cleanup.remove_unused_private_fields=true 43 | cleanup.remove_unused_private_members=false 44 | cleanup.remove_unused_private_methods=true 45 | cleanup.remove_unused_private_types=true 46 | cleanup.sort_members=false 47 | cleanup.sort_members_all=false 48 | cleanup.use_anonymous_class_creation=false 49 | cleanup.use_blocks=false 50 | cleanup.use_blocks_only_for_return_and_throw=false 51 | cleanup.use_lambda=true 52 | cleanup.use_parentheses_in_expressions=false 53 | cleanup.use_this_for_non_static_field_access=false 54 | cleanup.use_this_for_non_static_field_access_only_if_necessary=true 55 | cleanup.use_this_for_non_static_method_access=false 56 | cleanup.use_this_for_non_static_method_access_only_if_necessary=true 57 | cleanup.use_type_arguments=false 58 | cleanup_profile=org.eclipse.jdt.ui.default.eclipse_clean_up_profile 59 | cleanup_settings_version=2 60 | eclipse.preferences.version=1 61 | formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile 62 | formatter_settings_version=12 63 | org.eclipse.jdt.ui.javadoc=false 64 | org.eclipse.jdt.ui.text.custom_code_templates= 65 | -------------------------------------------------------------------------------- /ide/intellij/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | -------------------------------------------------------------------------------- /ide/intellij/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | workspace.xml 2 | tasks.xml 3 | -------------------------------------------------------------------------------- /ide/intellij/.idea/.name: -------------------------------------------------------------------------------- 1 | Battlecode Player -------------------------------------------------------------------------------- /ide/intellij/.idea/ant.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | -------------------------------------------------------------------------------- /ide/intellij/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /ide/intellij/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ide/intellij/.idea/libraries/Battlecode_Dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ide/intellij/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ide/intellij/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Battlecode_Client.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Battlecode_Headless.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Jar_Player__set_team__View___Tool_Windows___Ant_Build___Battlecode_2016_Scaffold___Properties___Execution_.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Map_Editor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Print_Version.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/runConfigurations/Update_Battlecode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /ide/intellij/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ide/intellij/Battlecode Player.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ide/intellij/Battlecode/Battlecode.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ivy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 21 | 23 | 25 | 26 | 28 | 29 | 31 | 32 | 33 | 36 | 37 | 38 | 40 | 42 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /maps/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/battlecode/battlecode-scaffold/97c3d29b002d3c97267dbc061176d13e6288af06/maps/.gitignore -------------------------------------------------------------------------------- /src/examplefuncsplayer/RobotPlayer.java: -------------------------------------------------------------------------------- 1 | package examplefuncsplayer; 2 | import battlecode.common.*; 3 | 4 | /** 5 | * REPLACE THIS BEFORE WE RELEASE!!!!!! !!! !! !!!!! !! 6 | */ 7 | public class RobotPlayer { 8 | static RobotController rc; 9 | 10 | /** 11 | * run() is the method that is called when a robot is instantiated in the Battlecode world. 12 | * If this method returns, the robot dies! 13 | **/ 14 | @SuppressWarnings("unused") 15 | public static void run(RobotController rc) throws GameActionException { 16 | RobotPlayer.rc = rc; 17 | switch (rc.getType()) { 18 | case ARCHON: 19 | runArchon(); 20 | break; 21 | case GARDENER: 22 | runGardener(); 23 | break; 24 | case SOLDIER: 25 | runSoldier(); 26 | break; 27 | 28 | } 29 | } 30 | 31 | static void runGardener() throws GameActionException { 32 | System.out.println("I'm a gardener!"); 33 | while (true) { 34 | Direction dir = new Direction((float) Math.random() * 2 * (float) Math.PI); 35 | if (rc.canBuildRobot(RobotType.SOLDIER, dir) && Math.random() < .01 && rc.isBuildReady()) { 36 | rc.buildRobot(RobotType.SOLDIER, dir); 37 | } 38 | moveRandom(); 39 | Clock.yield(); 40 | } 41 | } 42 | 43 | static void runArchon() throws GameActionException { 44 | System.out.println("I'm an archon!"); 45 | while (true) { 46 | Direction dir = new Direction((float) Math.random() * 2 * (float) Math.PI); 47 | if (rc.canBuildRobot(RobotType.GARDENER, dir) && Math.random() < .01 && rc.isBuildReady()) { 48 | rc.buildRobot(RobotType.GARDENER, dir); 49 | } 50 | moveRandom(); 51 | Clock.yield(); 52 | } 53 | } 54 | 55 | static void runSoldier() throws GameActionException { 56 | System.out.println("I'm an soldier!"); 57 | Team enemy = rc.getTeam() == Team.A ? Team.B : Team.A; 58 | while (true) { 59 | RobotInfo[] robots = rc.senseNearbyRobots(100, enemy); 60 | if (robots.length > 1) { 61 | if (rc.getTeamBullets() > 1) { 62 | rc.fireSingleShot(rc.getLocation().directionTo(robots[0].location)); 63 | } 64 | } 65 | moveRandom(); 66 | 67 | Clock.yield(); 68 | } 69 | } 70 | 71 | static void moveRandom() throws GameActionException { 72 | Direction dir = new Direction((float)Math.random() * 2 * (float)Math.PI); 73 | if (rc.canMove(dir)) { 74 | rc.move(dir); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /test/examplefuncsplayer/RobotPlayerTest.java: -------------------------------------------------------------------------------- 1 | package examplefuncsplayer; 2 | 3 | import static org.junit.Assert.*; 4 | import org.junit.Test; 5 | 6 | public class RobotPlayerTest { 7 | 8 | @Test 9 | public void testSanity() { 10 | assertEquals(2, 1+1); 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------