lutro-game-of-life/DeadCell.lua

20 lines
321 B
Lua
Raw Permalink Normal View History

2015-02-20 01:00:54 +00:00
DeadCell = Cell.new()
DeadCell.__index = DeadCell
function DeadCell.new(n)
local self = setmetatable({}, DeadCell)
return self
end
function DeadCell:getColor()
2015-02-23 01:37:43 +00:00
return 153, 153, 153
end
function DeadCell:nextGeneration(neighbour)
if neighbour==3 then
cell=AliveCell.new()
else
cell = self
end
return cell
2015-02-20 01:00:54 +00:00
end