diff --git a/game.gd b/game.gd index 0f61f6f..bcf8516 100644 --- a/game.gd +++ b/game.gd @@ -168,9 +168,19 @@ func _instant_win(): wonPlayer.show() nextPlayer.hide() board.active = false + +func _instant_loose(): + current_player = 1 - current_player + won = player_states[current_player] + print("Winner: ", won) + wonPlayer.region_rect.position.x = player_states.find(won) * 300 + wonPlayer.show() + nextPlayer.hide() + board.active = false #Zum Testen der Events func _on_test_pressed(): + _instant_loose() ereignis.text += "test" @@ -179,6 +189,9 @@ func _spin_the_wheel(result: int) -> void: if result <= 3: ereignis.text += "Instant win!" _instant_win() + elif result <= 6: + ereignis.text += "Instant loose!" + _instant_loose() elif result <= 15: ereignis.text += "Du darfst einen Stein entfernen!" if Input.is_action_just_pressed("Click"):