<commit_before># pokebattle-sim [![Build Status](https://secure.travis-ci.org/sarenji/pokebattle-sim.png?branch=master)](http://travis-ci.org/sarenji/pokebattle-sim)

A competitive Pokemon battle simulator playable in the browser.

## Set up

```bash
git clone git://github.com/sarenji/pokebattle-sim.git
cd pokebattle-sim
npm install
```

You also need to install redis. On Mac OS X with homebrew, you can do:

```bash
brew install redis
```

## Run server

We use [Grunt](http://gruntjs.com/) to handle our development. First, you must `npm install -g grunt-cli` to get the grunt runner. Then you can type

```bash
grunt
```

to automatically compile all client-side files and run nodemon for you.

### Vagrant

In case you are using Windows or wish to ensure that your development 
environment is consistent, you can use Vagrant. First, you must install 
[Vagrant](http://www.vagrantup.com/) and 
[VirtualBox](https://www.virtualbox.org/wiki/Downloads). Next, run this in the 
terminal, inside the project directory:

```bash
vagrant up
# a whole bunch of stuff
vagrant ssh
cd /vagrant
grunt
```

From there, everything is as normal. To destroy the Vagrant VM when you're 
done:

```bash
vagrant destroy
```

## Run tests

```bash
npm test
```

## Guide

pokebattle-sim is a one-page app. The server serves the client.

```
assets/          Main client code. Contains JS and CSS.
data/            Convert raw data into move/pokemon/etc instances.
scrapers/        Python scripts; turns Veekun's Pokedex into raw data.
server/          Battle logic, move logic, Pokemon logic, etc.
test/            Automated tests for server and client.
views/           All views that are rendered server-side go here.
app.coffee       The main entry point of pokebattle-sim.
                 The API and socket.io listeners are hosted here. This will probably change.
```

## Contributing

All contributions to the simulator logic must come with tests. If a
contribution does not come with a test that fails before your contribution and
passes after, your contribution will be rejected.

Other contributions (e.g. to the client) are much less strict!

## Issues

Report issues in GitHub's [issue
tracker](https://github.com/sarenji/pokebattle-sim/issues).<commit_msg>README: Update with new folder structure & tests.<commit_after># pokebattle-sim [![Build Status](https://secure.travis-ci.org/sarenji/pokebattle-sim.png?branch=master)](http://travis-ci.org/sarenji/pokebattle-sim)

A competitive Pokemon battle simulator playable in the browser.

## Set up

```bash
git clone git://github.com/sarenji/pokebattle-sim.git
cd pokebattle-sim
npm install
```

You also need to install redis. On Mac OS X with homebrew, you can do:

```bash
brew install redis
```

## Run server

We use [Grunt](http://gruntjs.com/) to handle our development. First, you must `npm install -g grunt-cli` to get the grunt runner. Then you can type

```bash
grunt
```

to automatically compile all client-side files and run nodemon for you.

### Vagrant

In case you are using Windows or wish to ensure that your development 
environment is consistent, you can use Vagrant. First, you must install 
[Vagrant](http://www.vagrantup.com/) and 
[VirtualBox](https://www.virtualbox.org/wiki/Downloads). Next, run this in the 
terminal, inside the project directory:

```bash
vagrant up
# a whole bunch of stuff
vagrant ssh
cd /vagrant
grunt
```

From there, everything is as normal. To destroy the Vagrant VM when you're 
done:

```bash
vagrant destroy
```

## Run tests

```bash
npm test
```

Or if you're in the Vagrant VM, you can just run

```bash
mocha
```

## Guide

pokebattle-sim is a one-page app. The server serves the client.

```
assets/          Main client code. Contains JS and CSS.
client/          Hosts client scripts
scrapers/        Python scripts; turns Veekun's Pokedex into raw data.
server/          Battle logic, move logic, Pokemon logic, etc.
test/            Automated tests for server and client.
views/           All views that are rendered server-side go here.
Gruntfile.coffee Contains all tasks for pokebattle-sim, like compiling.
app.coffee       The main entry point of pokebattle-sim.
                 The API and socket.io listeners are hosted here. This will probably change.
```

## Contributing

All contributions to the simulator logic must come with tests. If a
contribution does not come with a test that fails before your contribution and
passes after, your contribution will be rejected.

Other contributions (e.g. to the client) are much less strict!

## Issues

Report issues in GitHub's [issue
tracker](https://github.com/sarenji/pokebattle-sim/issues).
{'fraction_non_alphanumeric': 0.09231429798196651, 'fraction_numerical': 0.0, 'mean_word_length': 3.576620825147348, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2573159', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1392, 'n_words': 585}