All pastes #148539 Raw Edit

Untitled

public text v1 · immutable
#148539 ·published 2006-08-25 06:36 UTC
rendered paste body
Calculate_Winner
	Inputs: PlayerOne_Hand, PlayerTwo_Hand

	Winner = PlayerOne

        If PlayerOne_Hand = PlayerTwo_Hand Then
		Winner = Draw
	ElseIf PlayerOne_Hand = Rock And PlayerTwo_Hand = Paper Or _
		PlayerOne_Hand = Scissors And PlayerTwo_Hand = Rock Or _
		PlayerOne_Hand = Paper And PlayerTwo_Hand = Scissors Then
		Winner = PlayerTwo
	End If

	Return Winner
End Calculate_Winner