Need Help With Code

Hi so I am trying to make an Arduino project that will play rock paper scissors for a project. I have made it so that the player inputs work but when I go to do the computer inputs the randomize always picks the first if statement in my computerAns so it will only light up one LED which means the computer is only choosing scissors. If you know a way to fix this please help

I am also supposed to create a way to keep score to show the first one to three wins so if know a good way to do that that would be great but if not thanks for trying.

This is all my code so far

int Rock = 13;
int Paper = 12;
int Scissors = 11;
int sensorValue;
int sensorPin = 0;
int myPhoto = A1;
int buttonB = 2;
int randomNumber;
int comRock = 10;
int comPaper = 9;
int comScissors = 8;

void setup() {
// put your setup code here, to run once:
pinMode(Rock, OUTPUT);
pinMode(Paper, OUTPUT);
pinMode(Scissors, OUTPUT);
pinMode(myPhoto, INPUT);
pinMode(buttonB, INPUT);
pinMode(comRock, OUTPUT);
pinMode(comPaper, OUTPUT);
pinMode(comScissors, OUTPUT);

void loop() {
randomNumber = random(1,4);
void ScissorsV(){
sensorValue = analogRead(sensorPin);
if (sensorValue > 1000){
digitalWrite(Scissors, HIGH);

digitalWrite(Scissors, LOW);

void RockV(){
int myReading = analogRead (myPhoto);
if(myReading < 500){
digitalWrite(Rock, HIGH);

else if (myReading > 500){
digitalWrite(Rock, LOW);

void PaperV(){
int buttonBstate;
buttonBstate = digitalRead(buttonB);
if (buttonBstate == LOW){
digitalWrite(Paper, HIGH);

digitalWrite(Paper, LOW);

void computerAns(){
int buttonBstate;
int myReading = analogRead (myPhoto);
if (sensorValue > 1000 || myReading < 500 || buttonBstate == LOW){
if (randomNumber = 1){
digitalWrite(comScissors, HIGH);
digitalWrite(comScissors, LOW);
else if (randomNumber = 2){
digitalWrite(comPaper, HIGH);
digitalWrite(comPaper, LOW);
else if (randomNumber = 3){
digitalWrite(comRock, HIGH);
digitalWrite(comRock, LOW);


Please edit your post and add code tags, as described in the "How to use this forum" post.

This one!

Meanwhile, back at the code.if (randomNumber = 1){Oops