Yahtzee/Player.gd
Yadciel 59f13e7318 Update game UI from OptionButton to LineEdit
Replaced multiple OptionButton instances with LineEdit for input fields, including three_of_a_kind, four_of_a_kind, and chance. Updated related scoring logic and adjusted UI themes and assets to reflect the new input method.
2024-09-21 12:30:37 +02:00

40 lines
698 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 : String
var four_of_a_kind : String
var full_house : int
var small_straight : int
var large_straight : int
var yahtzee : int
var chance : String
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 = ""
self.four_of_a_kind = ""
self.full_house = 0
self.small_straight = 0
self.large_straight = 0
self.yahtzee = 0
self.chance = ""
self.bonus = 0
self.score = 0
func change_name(name: String):
self.name = name