Skip to content

Commit

Permalink
📦 Publish the project to PYPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Apr 9, 2024
1 parent afc4ae1 commit f15e7aa
Show file tree
Hide file tree
Showing 784 changed files with 197 additions and 15 deletions.
126 changes: 126 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# create by https://github.com/iamcco/coc-gitignore (Tue Apr 09 2024 13:59:22 GMT+0800 (China Standard Time))
# Python.gitignore:
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
2 changes: 1 addition & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ python main.py

# 怎样玩
* 使用鼠标收集阳光,收集植物卡片和植物的种子。
* 你可以通过更改 source/constants.py 中的 START_LEVEL_NUM 的数值来更改起始关卡:
* 你可以通过更改 plants_vs_zombies/constants.py 中的 START_LEVEL_NUM 的数值来更改起始关卡:
* 1 和 2:白昼模式
* 3: 夜晚模式
* 4: 传送带模式
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
* Python-Pygame 1.9

# How To Start Game
$ python main.py
$ python -m plants_vs_zombies
or
$ pip install plants-vs-zombies
$ plants-vs-zombies

# How to Play
* use mouse to collect sun, select the plant cards and seed the plant
* you can set the start level by changing START_LEVEL_NUM value in source/constants.py
* you can set the start level by changing START_LEVEL_NUM value in plants_vs_zombies/constants.py
* level 1 and 2:day level
* level 3: night level
* level 4: moving card select level
Expand Down
6 changes: 0 additions & 6 deletions main.py

This file was deleted.

File renamed without changes.
6 changes: 5 additions & 1 deletion source/main.py → plants_vs_zombies/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ def main():
c.GAME_LOSE: screen.GameLoseScreen(),
c.LEVEL: level.Level()}
game.setup_states(state_dict, c.MAIN_MENU)
game.main()
game.main()


if __name__=='__main__':
main()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit f15e7aa

Please sign in to comment.