<commit_before>**Subjunctive** – a *tile-based puzzle game* engine for Python 3

Note: Subjunctive's API is **not at all stable**. We are still in the
early development stages and things are likely to change a lot!

* * *

## Status of the games

### Think Green

**Think Green** is complete except for the following things, which are
totally missing:

*   title screen / death screen
*   score display
*   music

### Floorpaint

**Floorpaint** has partially complete level-file-loading, but that's
about it. It is missing:

*   core game mechanics (currently you can cross over your path)
*   level generation
*   graphics
*   title screen / instructions
*   music

## Dependencies

**Subjunctive** requires:

*   [Git]
*   [Python 3.3+] and (optional, but recommended) [virtualenv]
*   [sdl2], [sdl2_image], [sdl2_mixer]

> **Hint:** If you're not already using Linux, now would be a good time
> to consider doing so. Installing all this stuff would be as simple as
>
>     $ pacman -S git python3 python3-virtualenv sdl2 sdl2_gfx sdl2_image sdl2_mixer

To get all everything set up, clone our repository, create a virtualenv,
and install dependencies:

    $ git clone https://github.com/ufgmg/subjunctive
    $ cd subjunctive
    $ virtualenv .env
    $ .env/bin/pip install -e .

### Running the games

After installing as described in the previous section, you can run the
games like so:

    $ .env/bin/<game>.py

For example,

    $ .env/bin/think-green.py

### Adding a new game

Add your game's script to the `scripts` list in `setup.py`. Then, re-run

    $ .env/bin/pip install -e .

## Goals / design principles

Obviously the main goal is that it be *significantly* easier to
implement a game with Subjunctive than without. To accomplish that, here
are some general design principles:

*   Provide sane and useful defaults.
*   Make it easy to override defaults.
*   Let client code be as beautiful and succinct as possible.

And, as usual, [the Zen of Python] provides excellent guidance.

## Contributing

### Guidelines

#### Code/text format

*   **Indent with spaces (four per indentation level).** Make sure your
    editor inserts spaces when you press the Tab key.

*   **Read [PEP 8].**

*   **Use UNIX-style line endings.** Make sure your editor saves files
    with UNIX line endings (or that Git is [configured to normalize line
    endings when you
    commit](https://help.github.com/articles/dealing-with-line-endings)).

*   **Avoid trailing whitespace.** This means that blank lines cannot
    not contain any spaces or tabs! You can set up your editor to
    highlight or automatically remove trailing whitespace.

*   **Make sure the file ends with a newline.** `git diff` will show if
    you are about to commit a file with the newline removed. The reason
    for this is that many UNIX-style command-line tools think of the
    newline as a *terminator* rather than a separator. I think this
    interpretation is better in the majority of cases (one such case is
    concatenating two files: `cat <file> <file2>`).

    The crux of the matter is that you must make sure your editor writes
    a newline at the end of the file (if necessary, leave a blank line
    at the end).

#### Commit messages

Refer to [A Note About Git Commit Messages].

### Set-up

So, you want to help out? It's pretty easy, but there are a few things
you need to set up first.

1.  **Python**

    You need Python 3.3 or newer. You should be able to open a terminal
    and run the Python interpreter by typing `python` or `python3`.<commit_msg>Make README headings slightly more reasonable<commit_after>**Subjunctive** – a *tile-based puzzle game* engine for Python 3

Note: Subjunctive's API is **not at all stable**. We are still in the
early development stages and things are likely to change a lot!

* * *

## Status of the games

### Think Green

**Think Green** is complete except for the following things, which are
totally missing:

*   title screen / death screen
*   score display
*   music

### Floorpaint

**Floorpaint** has partially complete level-file-loading, but that's
about it. It is missing:

*   core game mechanics (currently you can cross over your path)
*   level generation
*   graphics
*   title screen / instructions
*   music

## Set-up

### Dependencies

**Subjunctive** requires:

*   [Git]
*   [Python 3.3+] and (optional, but recommended) [virtualenv]
*   [sdl2], [sdl2_image], [sdl2_mixer]

> **Hint:** If you're not already using Linux, now would be a good time
> to consider doing so. Installing all this stuff would be as simple as
>
>     $ pacman -S git python3 python3-virtualenv sdl2 sdl2_gfx sdl2_image sdl2_mixer

To get all everything set up, clone our repository, create a virtualenv,
and install dependencies:

    $ git clone https://github.com/ufgmg/subjunctive
    $ cd subjunctive
    $ virtualenv .env
    $ .env/bin/pip install -e .

### Running the games

After installing as described in the previous section, you can run the
games like so:

    $ .env/bin/<game>.py

For example,

    $ .env/bin/think-green.py

### Adding a new game

Add your game's script to the `scripts` list in `setup.py`. Then, re-run

    $ .env/bin/pip install -e .

## Goals / design principles

Obviously the main goal is that it be *significantly* easier to
implement a game with Subjunctive than without. To accomplish that, here
are some general design principles:

*   Provide sane and useful defaults.
*   Make it easy to override defaults.
*   Let client code be as beautiful and succinct as possible.

And, as usual, [the Zen of Python] provides excellent guidance.

## Contributing

### Guidelines

#### Code/text format

*   **Indent with spaces (four per indentation level).** Make sure your
    editor inserts spaces when you press the Tab key.

*   **Read [PEP 8].**

*   **Use UNIX-style line endings.** Make sure your editor saves files
    with UNIX line endings (or that Git is [configured to normalize line
    endings when you
    commit](https://help.github.com/articles/dealing-with-line-endings)).

*   **Avoid trailing whitespace.** This means that blank lines cannot
    not contain any spaces or tabs! You can set up your editor to
    highlight or automatically remove trailing whitespace.

*   **Make sure the file ends with a newline.** `git diff` will show if
    you are about to commit a file with the newline removed. The reason
    for this is that many UNIX-style command-line tools think of the
    newline as a *terminator* rather than a separator. I think this
    interpretation is better in the majority of cases (one such case is
    concatenating two files: `cat <file> <file2>`).

    The crux of the matter is that you must make sure your editor writes
    a newline at the end of the file (if necessary, leave a blank line
    at the end).

#### Commit messages

Refer to [A Note About Git Commit Messages].

### Set-up for contributing

So, you want to help out? It's pretty easy, but there are a few things
you need to set up first.

1.  **Python**

    You need Python 3.3 or newer. You should be able to open a terminal
    and run the Python interpreter by typing `python` or `python3`.
{'fraction_non_alphanumeric': 0.08216125887759365, 'fraction_numerical': 0.005013229355243003, 'mean_word_length': 3.4278668310727496, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '1706195', 'n_tokens_mistral': 2126, 'n_tokens_neox': 2039, 'n_words': 1011}