mirror of
https://github.com/libretro/lutro-game-of-life.git
synced 2024-11-26 17:40:21 +00:00
20 lines
321 B
Lua
20 lines
321 B
Lua
DeadCell = Cell.new()
|
|
DeadCell.__index = DeadCell
|
|
|
|
function DeadCell.new(n)
|
|
local self = setmetatable({}, DeadCell)
|
|
return self
|
|
end
|
|
|
|
function DeadCell:getColor()
|
|
return 153, 153, 153
|
|
end
|
|
|
|
function DeadCell:nextGeneration(neighbour)
|
|
if neighbour==3 then
|
|
cell=AliveCell.new()
|
|
else
|
|
cell = self
|
|
end
|
|
return cell
|
|
end |