V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
superwg1984
V2EX  ›  Python

新手学习,用 python 写了一个生命游戏,有些问题请各位帮忙

  •  
  •   superwg1984 ·
    superwg1984 · 2015-09-08 09:59:09 +08:00 · 2641 次点击
    这是一个创建于 3124 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://github.com/superwg1984/lifegame
    规则:
    当生命周围没有其他生命时,当前生命 hp+1,
    周围生命大于 4 个时,hp-1
    当生命 hp>=10 时,生命开始分裂出新的生命,这两个生命的 hp=5

    遇到的问题: 随着时间增加,执行速度越来越慢
    1 条回复    2015-09-11 23:34:28 +08:00
    scutfish
        1
    scutfish  
       2015-09-11 23:34:28 +08:00
    写这个程序的目的?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3341 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:24 · PVG 21:24 · LAX 06:24 · JFK 09:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.