Description - OriginalTanks/tanks GitHub Wiki

#Description# A basic overview of some of the features of our site, with pictures.

##How it works##

Our front end is written in reactjs - and our backend is written in node. Once you submit our code we pull it back, do some parsing to make sure you're not trying to destroy us and store it in the database. Once a game has four players, our Java game engine (separate from our Node web server) will pull the code for each of the tanks from the database compile it and run it dynamically in our game engine using reflection.

Results are stored in the database, and when you go to watch the game the game is 'played back' for you, as it were.

How it works

Below is an overview of the website and what you can do on the different pages.

##Upload Tank##

Here you can upload a tank by either: a) Pasting code into the provided field and giving it a name b) Uploading a java file - the tank name will be the filename.

You can download your code later, but formatting isn't preserved. So we recommend that you save a copy of your tanks.

For more information about how to write a tank, see the [write a tank] page.

##See Your Tanks##

Here you can see your tanks and look at the code. Pretty simple.

##Join a fight

This is where you create and join games. To create a game just put a name in and it'll appear in the list. To join a game, click join and select your tank you want to enter into the game. You can have more than one of the same tank in a game.

Once you've joined a game it'll show up in your games page.

##See your games##

This is where you can see all the games you've ever been in, and watch the game once they've been run. Simply click the "Watch Fight" button to pull up the screen. You can navigate away from the game at any point, and it'll bring you back here once you're done watching.

How long a game runs depends on how many moves happened before one tank lives. We have a hard cap of 1000 moves before a stalemate, but we've found that most games resolve themselves in about 50-200 moves.

##Watch a game##

Clicking on a game brings up this page - the game board is pretty basic, the legend at the bottom tells which tank is which in the game. Once the game is finished it'll take you back to the watch games page.