kittyverse library - helper classes for cattributes, trait types, traits, genes, genomes and more for cryptokitties and copycats
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
script
test
updates
.gitignore
CHANGELOG.md
GENES.md
LICENSE.md
Manifest.txt
README.md
Rakefile

README.md

Kittyverse

kittyverse library - helper classes for cattributes, trait types, traits, genes, genomes and more for cryptokitties and copycats

Usage

Traits

Use the Traits helper class to lookup trait types (e.g. fur, pattern, eye color, eye shape, base color, etc.) and traits (e.g. savannah, selkirk, chantilly, etc.):

t = Traits[ 'FU00' ]
p t.class      #=> Trait
p t.name       #=> "savannah"
p t.type.name  #=> "Fur"
p t.code       #=> "FU00"
p t.kai        #=> "1"

# -or-

t = Trait.find_by_code( 'FU00' )
t = Trait.find_by( code: 'FU00' )
t = Traits[ 'savannah' ]
t = Traits[ 'Savannah' ]
t = Trait.find_by_name( 'Savannah' )
t = Trait.find_by( name: 'Savannah' )
t = Traits[ :body ][ '1' ]
t = Traits[ :body ][ '00' ]
t = Traits[ :body ][ 0 ]
t = Traits[ 'FU' ][ '00' ]
t = Traits[ 'FU' ][0]
t = Traits[ :FU ][0]
t = Traits[ :FU00 ]
t = Traits[ 'Fur' ][0]
# ...

For trait types (e.g. fur, pattern, eye color, eye shape, base color, etc.) use:

t =  Traits[ :body ]
p t.class    #=> TraitType
p t.name     #=> "Fur"
p t.code     #=> "FU"
p t.genes    #=> "0-3"

# -or-

t = TraitType.find_by_key( :body )
t = TraitType.find_by( key: 'body' )
t = Traits[ 'Fur' ]
t = TraitType.find_by_name( 'Fur' )
t = TraitType.find_by( name: 'Fur' )
t = Traits[ 'FU' ]
t = Traits[ :FU ]
t = TraitType.find_by_code( 'FU' )
t = TraitType.find_by( code: 'FU' )
# ...

Real World Usage

See the copycats command line tool (and core library) - crypto cats / kitties collectibles unchained - buy! sell! hodl! sire! - play for free - runs off the blockchain - no ether / gas required

More Documentation / Articles / Samples

Questions? Comments?

Post them on the cryptokitties reddit. Thanks.

License

The kittyverse scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.