Changes

Add constructor for self-invocation
Line 14: Line 14:  
end
 
end
 
   
 
   
function EnemyShipCard:BattleCard(args)
+
function EnemyShipCard:create_ship(args)
 +
return EnemyShip(args.name, args.model)
 +
end
 +
 +
function EnemyShipCard(frame)
 +
local args = getArgs{frame = frame:getParent()}
 
local ship = self:create_ship(args)
 
local ship = self:create_ship(args)
 
return self:battle_card(ship, args)
 
return self:battle_card(ship, args)
end
  −
  −
function EnemyShipCard:create_ship(args)
  −
return EnemyShip(args.name, args.model)
   
end
 
end
 
   
 
   
 
return EnemyShipCard
 
return EnemyShipCard
Anonymous user