88.3k views
10 votes
does anyone know what functions to write for the rock paper scissors app in code.org (Lesson 4: parameters and return make)?

1 Answer

8 votes

Answer:

Step-by-step explanation:

Based on the example of the app on the website there are two main functions that are needed. The first is the updatecomputer_resultbox function which creates the choice for the computer in the game whether it is rock, paper, or scissors. The second function would be the calculate_winner function which compares your choice with the computers choice and decides on who won. The rest of the needed functions are the event functions to handle the clicks on each one of the games buttons such as play, rock, paper, scissor, and end game/replay.

User Msporek
by
3.9k points