#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$var = Random(1, 3, 1)
$var2 = "0"
$1 = 1
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 259, 155, 193, 125)
$Schere = GUICtrlCreateButton("Schere", 32, 32, 193, 25, 0)
$Stein = GUICtrlCreateButton("Stein", 32, 64, 193, 25, 0)
$Papier = GUICtrlCreateButton("Papier", 32, 96, 193, 25, 0)
$Label1 = GUICtrlCreateLabel($var2 & " Punkte", 32, 128, 193, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Schere
If $var = 1 Then
MsgBox(1, "Sieg!", "Glückwunsch! Du hast gewonnen! Der Computer hatte Papier. 1 Punkt für dich!")
$var2 +=1
ElseIf $var = 2 Then
MsgBox(1, "Niederlage...", "Du hast leider verloren. Der Computer hatte Stein. 1 Punkt Abzug.")
$var2 -=1
ElseIf $var = 3 Then
MsgBox(1, "Gleichstand.", "Der Computer hatte Schere, genau wie du. Kein Punkt.")
EndIf
Case $Stein
If $var = 1 Then
MsgBox(1, "Sieg!", "Glückwunsch! Du hast gewonnen! Der Computer hatte Schere. 1 Punkt für dich!")
$var2 +=1
ElseIf $var = 2 Then
MsgBox(1, "Niederlage...", "Du hast leider verloren. Der Computer hatte Papier. 1 Punkt Abzug.")
$var2 -=1
ElseIf $var = 3 Then
MsgBox(1, "Gleichstand.", "Der Computer hatte Stein, genau wie du. Kein Punkt.")
EndIf
Case $Papier
If $var = 1 Then
MsgBox(1, "Sieg!", "Glückwunsch! Du hast gewonnen! Der Computer hatte Stein. 1 Punkt für dich!")
$var2 +=1
ElseIf $var = 2 Then
MsgBox(1, "Niederlage...", "Du hast leider verloren. Der Computer hatte Schere. 1 Punkt Abzug.")
$var2 -=1
ElseIf $var = 3 Then
MsgBox(1, "Gleichstand.", "Der Computer hatte Papier, genau wie du. Kein Punkt.")
EndIf
EndSwitch
WEnd