Giter Club home page Giter Club logo

dogbreeding's Introduction

Dog Breeding

Let's Make Some Puppies!

This repo contains a javascript file that breeds dogs based on the following rules:

Name:

name = father's name + mother's name + order of birth in litter example: father: 'A' and mother: 'B' have 3 puppies: [A-B-1], [A-B-2], and [A-B-3]

Gender:

Odds of generating a male or female is 50%

Litter Size:

Smaller dogs have smaller litters than big dogs. Here is our rule:

Size of Mother Average Litter

  • < 10 lbs = 3 puppies with 10% chance of plus or minus 1
  • 10 to 25 lbs = 5 puppies with 10% chance of + or - 1
  • 26 to 50 lbs = 7 puppies with 10% chance of + or - 2
  • 51 to 90 lbs = 9 puppies with 10% chance of + or - 2

Color:

Parent Color Genetic Odds

  • Mixed = Mixed 70%, Black 10%, White 10%, Brown 10%,
  • Black = Mixed 10%, Black 60%, White 10%, Brown 20%
  • Brown = Mixed 15%, Black 10%, White 5%, Brown 70%
  • White = Mixed 10%, Black 10%, White 60%, Brown 20%

Each parent will contribute a color gene based on the above odds They will be combined based on the following genetic dominance traits: if father.color = 'black' then there is a 60% chance his colorContribution will be black

Each parent contributes a color gene if colors are the same, puppies are the same color if colors are different the order of dominance is: Mixed, Black, Brown, White

Fur:

Dogs can have long or short fur with long fur being dominant. If both father and mother have the same length fur so will the puppies. If one has long and one has short, puppy will have long fur Except for genetic mutations which happen 10% of the time where fur will be random.

Size of dog:

Puppies will grow to the average size of their father and mother, plus or minus 20%

For developer access to the code:

  • fork this repo to your github account
  • clone the repo from your account to your local pc
  • create a new branch for your code changes: git checkout -b yourbranch
  • commit and push your changes: git push origin yourbranch
  • issue a pull request on github for your branch back to this repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.