2024-08-19 09:33:32 +02:00
|
|
|
class_name Player
|
|
|
|
|
|
|
|
var name: String
|
|
|
|
var one : int
|
|
|
|
var two : int
|
|
|
|
var three : int
|
|
|
|
var four : int
|
|
|
|
var five : int
|
|
|
|
var six : int
|
2024-09-21 12:30:37 +02:00
|
|
|
var three_of_a_kind : String
|
|
|
|
var four_of_a_kind : String
|
2024-08-19 09:33:32 +02:00
|
|
|
var full_house : int
|
|
|
|
var small_straight : int
|
|
|
|
var large_straight : int
|
|
|
|
var yahtzee : int
|
2024-09-21 12:30:37 +02:00
|
|
|
var chance : String
|
2024-08-19 09:33:32 +02:00
|
|
|
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
|
2024-09-21 12:30:37 +02:00
|
|
|
self.three_of_a_kind = ""
|
|
|
|
self.four_of_a_kind = ""
|
2024-08-19 09:33:32 +02:00
|
|
|
self.full_house = 0
|
|
|
|
self.small_straight = 0
|
|
|
|
self.large_straight = 0
|
|
|
|
self.yahtzee = 0
|
2024-09-21 12:30:37 +02:00
|
|
|
self.chance = ""
|
2024-08-19 09:33:32 +02:00
|
|
|
self.bonus = 0
|
|
|
|
self.score = 0
|
|
|
|
|
|
|
|
func change_name(name: String):
|
|
|
|
self.name = name
|