0 Star 0 Fork 0

hippo / snake

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rock.py 508 Bytes
一键复制 编辑 原始数据 按行查看 历史
hippo 提交于 2015-10-26 15:53 . merge update
'''
Created on 2009-4-15
@author: hippo
'''
from node import *
class Rock(Node):
def __init__(self, x=None, y=None):
if x is None or y is None:
self.reset()
else:
self._x = x
self._y = y
self.color = '#101010'
self.edgecolor = 'black'
def reset(self):
self._x = randint(0, GRID_LEN - 1)
self._y = randint(0, GRID_LEN - 1)
def __str__(self):
return 'x=' + repr(self._x) + ',y=' + repr(self._y)
Python
1
https://gitee.com/biz00/snake.git
git@gitee.com:biz00/snake.git
biz00
snake
snake
master

搜索帮助