Yahtzee/Player.gd
2024-08-19 09:34:15 +02:00

40 lines
686 B
GDScript

class_name Player
var name: String
var one : int
var two : int
var three : int
var four : int
var five : int
var six : int
var three_of_a_kind : int
var four_of_a_kind : int
var full_house : int
var small_straight : int
var large_straight : int
var yahtzee : int
var chance : int
var bonus : int
var score: int
func _init(name: String):
self.name = name
self.one = 0
self.two = 0
self.three = 0
self.four = 0
self.five = 0
self.six = 0
self.three_of_a_kind = 0
self.four_of_a_kind = 0
self.full_house = 0
self.small_straight = 0
self.large_straight = 0
self.yahtzee = 0
self.chance = 0
self.bonus = 0
self.score = 0
func change_name(name: String):
self.name = name