-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPlayer.d.ts
100 lines (100 loc) · 2.51 KB
/
Player.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import { Position } from './enums/Position';
export interface PlayerInfo {
name: string;
number: number;
}
export interface PlayerBiometrics {
height: number;
weight: number;
}
export interface MentalAttributes {
aggression: number;
anticipation: number;
bravery: number;
composure: number;
concentration: number;
decisions: number;
determination: number;
flair: number;
leadership: number;
offTheBall: number;
positioning: number;
teamwork: number;
vision: number;
workRate: number;
}
export interface PhysicalAttributes {
acceleration: number;
agility: number;
balance: number;
jumpingReach: number;
naturalFitness: number;
pace: number;
stamina: number;
strength: number;
}
export interface TechnicalAttributes {
corners: number;
crossing: number;
dribbling: number;
finishing: number;
firstTouch: number;
freeKickTaking: number;
heading: number;
longShots: number;
longThrows: number;
marking: number;
passing: number;
penaltyTaking: number;
tackling: number;
technique: number;
}
export interface GoalkeeperAttributes {
aerialReach: number;
commandOfArea: number;
communication: number;
eccentricity: number;
handling: number;
oneOnOnes: number;
reflexes: number;
rushingOut: number;
tendencyToPunch: number;
throwing: number;
}
export interface PlayerAttributes extends MentalAttributes, PhysicalAttributes, TechnicalAttributes, GoalkeeperAttributes {
}
export interface PlayerInterface {
info: PlayerInfo;
biometrics: PlayerBiometrics;
attributes: PlayerAttributes;
}
export interface PlayerRating {
pace: number;
shooting: number;
passing: number;
dribbling: number;
defending: number;
physique: number;
}
export interface GoalkeeperRating {
diving: number;
hands: number;
kicking: number;
reflexes: number;
speed: number;
positioning: number;
}
export default class Player implements PlayerInterface {
info: PlayerInfo;
biometrics: PlayerBiometrics;
attributes: PlayerAttributes;
position: Position;
constructor(info: PlayerInfo, biometrics: PlayerBiometrics, attributes: PlayerAttributes, position: Position);
ratingAverage(): number;
rating(): PlayerRating | GoalkeeperRating;
averageRating(ratings: number[]): number;
defenceRating(): number;
possessionRating(): number;
attackRating(): number;
attributesAverage(...attributes: number[]): number;
}