Skip to content

Instantly share code, notes, and snippets.

@warmist
Forked from thistleknot/temp.lua
Last active December 21, 2015 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warmist/6230604 to your computer and use it in GitHub Desktop.
Save warmist/6230604 to your computer and use it in GitHub Desktop.
TraitArrayBins = defclass(TraitArrayBins)
TraitArrayBins.ATTRS={
name=DEFAULT_NIL,
traitMin=0,
traitMed=0,
traitMax=0,
}
function TraitArrayBins.init(args) --not sure if needed
end
function TraitArrayBins:get()
print("Name: ", self.name, self.traitMin, self.traitMed, self.traitMax)
end
-- create and use an Account
tempTrait = TraitArrayBins{name="Willpower", traitMin=0, traitMed=50, traitMax=100} --not sure if there is a way do this
--with non-named args
tempTrait:get()
t_Holder = {}
for int = 1, 30 do
t_Holder[int] = TraitArrayBins{name="Willpower", traitMin=0+int, traitMed=50, traitMax=100-int}
end
for int = 1, 30 do
t_Holder[int]:get()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment