mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 10:24:07 +02:00
store kills directly with players
This commit is contained in:
parent
217dee4cd4
commit
6d01061c58
11 changed files with 83 additions and 84 deletions
|
|
@ -12,8 +12,22 @@ class Player {
|
|||
private string $name;
|
||||
private string $team;
|
||||
private string $class;
|
||||
private int $kills;
|
||||
private int $assists;
|
||||
private int $deaths;
|
||||
|
||||
public function __construct(int $id, int $demoId, int $demoUserId, int $userId, string $name, string $team, string $class) {
|
||||
public function __construct(
|
||||
int $id,
|
||||
int $demoId,
|
||||
int $demoUserId,
|
||||
int $userId,
|
||||
string $name,
|
||||
string $team,
|
||||
string $class,
|
||||
int $kills,
|
||||
int $assists,
|
||||
int $deaths
|
||||
) {
|
||||
$this->id = $id;
|
||||
$this->demoId = $demoId;
|
||||
$this->demoUserId = $demoUserId;
|
||||
|
|
@ -21,6 +35,9 @@ class Player {
|
|||
$this->name = $name;
|
||||
$this->team = $team;
|
||||
$this->class = $class;
|
||||
$this->kills = $kills;
|
||||
$this->assists = $assists;
|
||||
$this->deaths = $deaths;
|
||||
}
|
||||
|
||||
public function getId(): int {
|
||||
|
|
@ -50,4 +67,16 @@ class Player {
|
|||
public function getClass(): string {
|
||||
return $this->class;
|
||||
}
|
||||
|
||||
public function getKills(): int {
|
||||
return $this->kills;
|
||||
}
|
||||
|
||||
public function getAssists(): int {
|
||||
return $this->assists;
|
||||
}
|
||||
|
||||
public function getDeaths(): int {
|
||||
return $this->deaths;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue