mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-15 16:34:48 +00:00
✅ add scoreboard tests
This commit is contained in:
parent
7cd8bbeadb
commit
9f4617fb52
2 changed files with 78 additions and 4 deletions
|
|
@ -1,14 +1,28 @@
|
|||
class_name Scoreboard extends Node
|
||||
# This file is part of open-fpsz.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
class_name Scoreboard extends Node2D
|
||||
|
||||
# define the properties
|
||||
@export var num_teams: int = 1
|
||||
@export var num_players_per_team: int = 1
|
||||
@export var _num_teams: int = 1
|
||||
@export var _num_players_per_team: int = 1
|
||||
|
||||
# define the scoreboard dictionary
|
||||
var scoreboard := {}
|
||||
|
||||
# initialize the scoreboard
|
||||
func _init() -> void:
|
||||
func _init(num_teams: int = _num_teams, num_players_per_team: int = _num_players_per_team) -> void:
|
||||
scoreboard = {}
|
||||
for team in range(1, num_teams + 1):
|
||||
scoreboard[team] = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue