determine who wins in oya
This commit is contained in:
parent
528603f90d
commit
371af850ae
|
@ -7,3 +7,6 @@ var type: int
|
|||
func _init(month: int, type: int):
|
||||
self.month = month
|
||||
self.type = type
|
||||
|
||||
func desc() -> String:
|
||||
return "CardValue({m}, {t})".format({"m": Enums.Month.keys()[month], "t": Enums.Type.keys()[type]})
|
||||
|
|
13
Main.gd
13
Main.gd
|
@ -37,4 +37,17 @@ func oya():
|
|||
|
||||
yield(tween, "tween_all_completed")
|
||||
|
||||
print("Player 1: {c}".format({"c": card_1.value.desc()}))
|
||||
print("Player 2: {c}".format({"c": card_2.value.desc()}))
|
||||
if card_1.value.month < card_2.value.month:
|
||||
print("Player 1 is the oya")
|
||||
elif card_1.value.month > card_2.value.month:
|
||||
print("Player 2 is the oya")
|
||||
elif card_1.value.type >= Enums.Type.SCRAP_1 and card_2.value.tyoe >= Enums.Type.SCRAP_1:
|
||||
print("Cards have the same value, redraw")
|
||||
elif card_1.value.type < card_2.value.type:
|
||||
print("Player 1 is the oya")
|
||||
else:
|
||||
print("Player 2 is the oya")
|
||||
|
||||
print("update oya")
|
||||
|
|
Loading…
Reference in a new issue