代码拉取完成,页面将自动刷新
'''
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)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。