removed assert test queries

This commit is contained in:
2025-07-20 17:46:32 +02:00
parent 08799a3809
commit 5e54ce45e7
2 changed files with 0 additions and 46 deletions
-25
View File
@@ -7,31 +7,6 @@ enum CardStyle {
STICKMAN, STICKMAN,
} }
func _ready() -> void:
# magician wins
assert(get_winning_card([1, 2, 3, 59], -1) == 59)
assert(get_winning_card([1, 2, 3, 59], 3) == 59)
assert(get_winning_card([57, 2, 3, 59], 3) == 57)
# trump wins
assert(get_winning_card([1, 14, 2, 3], 4) == 3)
assert(get_winning_card([29, 14, 27, 31], 15) == 14)
assert(get_winning_card([1, 12, 6, 31], 30) == 31)
# joker win
assert(get_winning_card([54, 52, 55, 53], 31) == 54)
# other wins
assert(get_winning_card([14, 15, 18, 13], 16) == 18)
assert(get_winning_card([14, 15, 18, 13], 46) == 18)
# trumpless win
assert(get_winning_card([28, 12, 31, 13], -1) == 31)
# score calculation tests
assert(BetResult.new(1, 1).get_score() == 30)
assert(BetResult.new(0, 0).get_score() == 20)
assert(BetResult.new(4, 4).get_score() == 60)
assert(BetResult.new(1, 2).get_score() == -10)
assert(BetResult.new(1, 4).get_score() == -30)
assert(BetResult.new(4, 1).get_score() == -30)
func get_shuffled_cards(client_ids: Array[String], cards_to_pick: int) -> Dictionary: # Dictionary[String, Array[int]] func get_shuffled_cards(client_ids: Array[String], cards_to_pick: int) -> Dictionary: # Dictionary[String, Array[int]]
var dict: Dictionary = {} var dict: Dictionary = {}
var deck: Array[int] = full_deck.keys() var deck: Array[int] = full_deck.keys()
-21
View File
@@ -34,27 +34,6 @@ signal card_selected(card_id: int)
signal card_played(card_id: int) signal card_played(card_id: int)
func _ready() -> void: func _ready() -> void:
# tests!
# tries playing same color
assert(_is_card_allowed(1, 3, [1, 15]) == true)
# tries playing trump while having same color
assert(_is_card_allowed(15, 3, [1, 15]) == false)
# tries playing trump while not having the same color
assert(_is_card_allowed(15, 3, [19, 15]) == true)
# tries playing first card
assert(_is_card_allowed(27, -1, [27, 1, 15]) == true)
# tries playing wizard as first
assert(_is_card_allowed(59, -1, [59, 1, 15]) == true)
# tries playing wizard as non-first
assert(_is_card_allowed(59, 3, [59, 1, 15]) == true)
# tries playing wizard after first is wizard
assert(_is_card_allowed(59, 58, [59, 1, 15]) == true)
# tries playing numbered after first is jester
assert(_is_card_allowed(3, 54, [3, 1, 15]) == true)
assert(_is_card_allowed(13, 48, [13]) == true)
if hide_client_name: if hide_client_name:
name_label.hide() name_label.hide()