HR-Collector/Extension/horse.js
2024-12-07 13:46:04 +01:00

72 lines
No EOL
2.7 KiB
JavaScript

// Modell für ein Pferd
var globalHorse = {
// Basic
id: null, // ID of the horse
age: null, // age of the horse
horse_name: null, // name of the horse
gender: null, // gender of the horse
breed: null, // breed of the horse
link: null, // link to the horse's page
// Summary, Pedigree
relatedIds: [], // IDs of related horses
// Training
training: null, // training of the horse e.g. Basic Training
// Genetics
GP: 0, // GP of the horse
features: {}, // features of the horse e.g. Dressage, Driving, Endurance etc.
// Genes
Extension: null, // Extension gene of the horse
Agouti: null, // Agouti gene of the horse
Grey: null, // Grey gene of the horse
Cream: null, // Cream gene of the horse
Dun: null, // Dun gene of the horse
Champagne: null, // Champagne gene of the horse
Silver: null, // Silver gene of the horse
Mushroom: null, // Mushroom gene of the horse
Frame: null, // Frame gene of the horse
Appaloosa: null, // Appaloosa gene of the horse
PATN1: null, // PATN1 gene of the horse
MITF: null, // MITF gene of the horse
SW2: null, // SW2 gene of the horse
KIT: null, // KIT gene of the horse
RAB: null, // RAB gene of the horse
Seal: null, // Seal gene of the horse
Flaxen: null, // Flaxen gene of the horse
// Achievements
conformation: {}, // conformation of the horse e.g. Walk, Trot, Canter, Gallop, Jumping, Dressage
shortConformation : null, // Short conformation of the horse (e.g. 12VG)
maxShowResult: 0, // max show result of the horse
minShowResult: 0, // min show result of the horse
maxCompetitionResult: 0, // max competition result of the horse
minCompetitionResult: 0, // min competition result of the horse
// Health
fertility: null, // fertility of the horse
colicRestance: null, // colic resistance of the horse
hoofQuality: null, // hoof quality of the horse
backProblems: null, // back problems of the horse
respiratoryDisease: null, // respiratory disease of the horse
resistanceToLameness: null, // resistance to lameness of the horse
};
function createNewHorse(id, age, horse_name, gender, breed, link) {
globalHorse = new globalHorse();
}
// Funktion zum Setzen von Daten
function setHorseData(id, age, horse_name, gender, breed, link) {
globalHorse.id = id;
globalHorse.age = age;
globalHorse.horse_name = horse_name;
globalHorse.gender = gender;
globalHorse.breed = breed;
globalHorse.link = link;
}
function getHorseData() {
return globalHorse;
}