<commit_before># pool_fee
> library to calculate how to split the bill of a pool game

To Start, create a fork of the example timeline `timeline_20151127.js`, run

```
node timeline_20151127.js
```<commit_msg>update README with usage and todo<commit_after># pool_fee
> library to calculate how to split the bill of a pool game

To Start, create a fork of the example timeline `timeline_20151127.js`, run

```
node timeline_20151127.js
```

## Features:
- Input when did each table open and close, along with how much it cost per minute

  ```
    // create a table which costs $35 per hour
    var table = new Table('table_alias', 35 / 60);
    // open this table at 19:00
    table.JoinPool(pool, new Date('2015-11-27 19:00'));
    // close this table at 21:00
    table.LeftPool(pool, new Date('2015-11-27 21:00'))
  ```

- Input when did everyone arrive and leave

  ```
    // create player with a alias and an optional discount
    var tom = new Player('tom');

    // join pool at 19:00
    tom.JoinPool(pool,new Date('2015-11-27 19:00'));

    // left pool at 21:00
    tom.LeftPool(pool,new Date('2015-11-27 21:00'));
  ```

- Optional, place a discount on anyone

  ```
    // now jerry weights 0.8 while others weights 1
    var jerry = new Player('jerry',0.8);
  ```

- Optional, charge extra money on anyone

  ```
    // tom ate something worth $23, which should not be paid by everyone
    tom.Eat(23);
  ```


## TODO:

- Create Android App and iOS App for that
{'fraction_non_alphanumeric': 0.11449864498644986, 'fraction_numerical': 0.07520325203252033, 'mean_word_length': 3.125698324022346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1803747', 'n_tokens_mistral': 543, 'n_tokens_neox': 454, 'n_words': 188}