global multi score; global number totalScore = 0; proc init {} choice choose { choice thistime = rock; if (rounds = 0) { //no rounds have been played yet thistime = random choice; } else if (outcome[rounds] = win) { //we won //score = 1 number score[rounds] = 1; totalScore = totalScore + 1; thistime = me[rounds]; } else if (outcome[rounds] = tie) { //score = 0 number score[rounds] = 0; thistime = random choice; } else { //we lost //score = -1 number score[rounds] = -1; totalScore = totalScore - 1; thistime = you[rounds]; } return thistime; }