Metadata-Version: 2.4
Name: tfwr-expand
Version: 0.1.1
Summary: A library for The Farmer Was Replaced.
Author: Orange 233
Author-email: Orange 233 <orange_233@foxmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Project-URL: Homepage, https://github.com/Orange23333/tfwr-expand
Project-URL: Issues, https://github.com/Orange23333/tfwr-expand/issues
Description-Content-Type: text/markdown

<h1>Expand Library of <i>The Farmer Was Relpaced</i></h1>

Just copy all the file into your save folder to use it.
Also you can install this libray by excuting `pip install TFWR-expand`.

**CAUTION: Remember to backup a `__builtin__.py` file in your save folder before using this library. This library will overwrite your `__builtin__.py` file. Or, you can use this libray at other folder or do not copy `__builtin__.py` file into your save folder.**

Enjoy it!

# Document

Basically, `__builtin__.py`, `__init__.py` and `_tfwr_official_provided.__builtins__.py` provide the *Python* language features to you.
They are *Python* scripts which **can't** be imported in the game.

## algorithms

`import algorithms`.

### `qsort(arr)`

Calling `algorithms.qsort(arr)` with any `list` will sort it.

For example:
```python
from algorithms import qsort

arr = [3, -1, 11, 0, 7]

qsort(arr)

print(arr)  # [-1, 0, 3, 7, 11]
```

## tools

`import tools`.

### `has_item(item)`

Calling `tools.has_item(item)` for checking whether player has `Items`. Returns `True` if the player has it, otherwise `False`.

### `cost_enough(entity, level=None, scale=1.0)`

Calling `tools.cost_enough(thing, level=None, scale=1.0)` for checking whether player has enough item(s) to buy or plant the `thing`. Returns `True` if the player has enough item(s), otherwise `False`.
