Last active
December 21, 2015 00:09
-
-
Save thistleknot/6217867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TraitArrayBins = {} | |
TraitArrayBins.__index = TraitArrayBins | |
function TraitArrayBins.create(name, traitMin, traitMed, traitMax) | |
local trait = {} | |
setmetatable(trait,TraitArrayBins) | |
trait.name = name | |
trait.traitMin = traitMin | |
trait.traitMed = traitMed | |
trait.traitMax = traitMax | |
return trait | |
end | |
function TraitArrayBins:get() | |
print("Name: ", self.name, self.traitMin, self.traitMed, self.traitMax) | |
end | |
-- create and use an Account | |
tempTrait = TraitArrayBins.create("Willpower", 0, 50, 100) | |
tempTrait:get() | |
t_Holder = {} | |
for int = 1, 30 do | |
t_Holder[int] = TraitArrayBins.create("Willpower", 0+int, 50, 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