| | |
| | | 'cup' => [ |
| | | 'number' => '#76', |
| | | 'name' => '5on5 Open Cup', |
| | | 'bestof' => '5', |
| | | ], |
| | | 'team' => [ |
| | | 'orange' => |
| | | [ |
| | | 'name' => 'Narancs Csapat', |
| | | 'ban' => [ |
| | | 'name' => 'Narancs Csapat', |
| | | 'ban' => [ |
| | | 'mira', |
| | | 'jackal' |
| | | ], |
| | | 'score' => [ |
| | | true, |
| | | true, |
| | | true |
| | | ] |
| | | |
| | | ], |
| | | 'blue' => [ |
| | | 'name' => 'Kék csapat', |
| | | 'ban' => [ |
| | | 'name' => 'Kék csapat', |
| | | 'ban' => [ |
| | | 'rook', |
| | | 'blitz' |
| | | ], |
| | | 'score' => [ |
| | | true, |
| | | true, |
| | | true |
| | | ] |
| | |
| | | $this->state['team'][$team]['score'][$number] = $score; |
| | | } |
| | | |
| | | public function setCup(string $number, string $name) |
| | | public function setCup(string $number, string $name, int $bestOf = 1) |
| | | { |
| | | $this->state['cup']['number'] = $number; |
| | | $this->state['cup']['name'] = $name; |
| | | $this->state['cup']['bestof'] = $bestOf; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | public function setTeamName(string $team_color = self::TEAM_BLUE, $name= '') |
| | | public function setTeamName(string $team_color = self::TEAM_BLUE, $name = '') |
| | | { |
| | | $this->testColor($team_color); |
| | | $this->state['team'][$team_color]['name'] = $name; |
| | |
| | | unset($this->state); |
| | | $this->state = []; |
| | | |
| | | if (!empty($state['team']['orange']['score'][0])) { |
| | | $this->setScore('orange',0,true); |
| | | if (!empty($state['team']['orange']['score'][0])) |
| | | { |
| | | $this->setScore('orange', 0, true); |
| | | } |
| | | |
| | | if (!empty($state['team']['orange']['score'][1])) { |
| | | $this->setScore('orange',1,true); |
| | | if (!empty($state['team']['orange']['score'][1])) |
| | | { |
| | | $this->setScore('orange', 1, true); |
| | | } |
| | | |
| | | if (!empty($state['team']['blue']['score'][0])) { |
| | | $this->setScore('blue',0,true); |
| | | if (!empty($state['team']['orange']['score'][2])) |
| | | { |
| | | $this->setScore('orange', 2, true); |
| | | } |
| | | |
| | | if (!empty($state['team']['blue']['score'][1])) { |
| | | $this->setScore('blue',1,true); |
| | | if (!empty($state['team']['blue']['score'][0])) |
| | | { |
| | | $this->setScore('blue', 0, true); |
| | | } |
| | | |
| | | if (!empty($state['team']['blue']['score'][1])) |
| | | { |
| | | $this->setScore('blue', 1, true); |
| | | } |
| | | |
| | | if (!empty($state['team']['blue']['score'][2])) |
| | | { |
| | | $this->setScore('blue', 2, true); |
| | | } |
| | | |
| | | if (!empty($state['stripe']["class"])) |
| | |
| | | $this->setClass($state['stripe']["class"]); |
| | | } |
| | | |
| | | if (!empty($state['cup']['name']) || !empty($state['cup']['number'])) |
| | | if (!empty($state['cup']['name']) || !empty($state['cup']['number']) || !empty($state['cup']['bestof'])) |
| | | { |
| | | $cupNum = $state['cup']['number'] ?? ''; |
| | | $cupName = $state['cup']['name'] ?? ''; |
| | | $this->setCup($cupNum, $cupName); |
| | | $bestOf = (int) $state['cup']['bestof'] ?? 1; |
| | | $this->setCup($cupNum, $cupName, $bestOf); |
| | | } |
| | | |
| | | if (!empty($state['team'])) |