#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
a = [*1..8] #生成应该数组a
for i in 0..100 #循环1-100
a[i] = 2 * i #给数组里的第i个单元赋值2 * i
if a[i] % 10 == 6 #如果第i个单元与10 相除余6
a[i] = nil #则赋予这个单元nil
end
end
self.contents.clear
x = 0
y = 100
h = 300
self.contents.font.color = system_color
self.contents.draw_text(x, y, h, 32,"#{a.compact}" , 0)
end
end
结果。。。
怎么破???