Skip to content

📦 Publish the project to PYPI #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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.
Loading