Please help with a simple program

Here is the game I want to achieve. A red light will be solid until the two players press and hold a button. Once the buttons are press the red led will flash seven times and then become solid. The first player to release his/her button after the 7th flashes wins and a green light will turn on beside the winners button to indicate that he/she won. If a player release too early then the other player will automatically. Once a winner is established his green light will turn. Then a small delay will happen and a new game will start. I know that my code is horrific as I'm learning. Can you please go over it and help me.

Thanks

int buttonOne=0; //pin 0 as button for 1st player
int buttonTwo=1; //pin 1 as button pin for second player
int ledOne=2; //pin 2 as led for first player
int ledTwo=3; //pin 3 as led for second player
int tZero=5; //pin5 for t=0 indicator led (grn)
int tOne=6; //pin6 for t=1 led
int tTwo=7; //pin7 for t=2 led
int tThree=8; //pin8 for t=3 led

void setup() {
pinMode(buttonOne, INPUT);
pinMode(buttonTwo, INPUT);
pinMode(ledOne, OUTPUT);
pinMode(ledTwo, OUTPUT);
pinMode(tZero, OUTPUT);
pinMode(tOne, OUTPUT);
pinMode(tTwo, OUTPUT);
pinMode(tThree, OUTPUT);
}

void loop() {

//sets start time for round to compare against false starts
int roundTime=millis();
// flashes amber leds for 1 s. period=200
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,LOW);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,LOW);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,LOW);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,LOW);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(100);
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,LOW);
delay(1100);
//t=3s
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,LOW);
digitalWrite (tThree,HIGH);
delay(1000);
//t=2s
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,LOW);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(1000);
//t=1s
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,LOW);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
delay(1000);
//time=0sec
while (buttonOne==LOW && buttonTwo==LOW ) {
digitalWrite (ledOne,LOW);
digitalWrite (ledTwo,LOW);
digitalWrite (tZero,HIGH);
digitalWrite (tOne,HIGH);
digitalWrite (tTwo,HIGH);
digitalWrite (tThree,HIGH);
}
//records absolute time of button being pressed

if (digitalRead)( buttonOne==HIGH);
{
int pbOneTime=millis()
}
else (digitalRead)( buttonTwo==HIGH)
{
int pbTwoTime=millis();
}

//win/loss/\DQ logic

if pbOneTime<5000+roundTime {
digitalWrite ledTwo,HIGH
}
else if pbTwoTime<5000+roundTime {
digitalWrite ledOne, HIGH
}
else if (pbTwoTime<5000+roundTime) && (pbOneTime>5000+roundTime) {
delay(2000);
}
else if (pbOneTime<pbTwoTime {
digitalWrite ledOne, HIGH;
}
else if (pbTwoTime<pbOneTime {
digitalWrite ledTwo,HIGH;
}
}

Sorry for not uploading the code the right way, I’m just figuring out this forum.

Hi, you may want go back and play with the example sketches the arduino software comes with.
This is not proper, and your code doesn’t compile.

if (digitalRead)( buttonOne==HIGH);
 {  
    int pbOneTime=millis()
 }
   else (digitalRead)( buttonTwo==HIGH)
    {
       int pbTwoTime=millis();
     }

   //win/loss/\DQ logic

   if pbOneTime<5000+roundTime {
     digitalWrite ledTwo,HIGH
   }
   else if pbTwoTime<5000+roundTime {
     digitalWrite ledOne, HIGH
   }
   else if (pbTwoTime<5000+roundTime) && (pbOneTime>5000+roundTime) {
     delay(2000);
   }
   else if (pbOneTime<pbTwoTime {
     digitalWrite ledOne, HIGH;
   }
   else if (pbTwoTime<pbOneTime {
     digitalWrite ledTwo,HIGH;
   }
 }

If both players need to hold down their buttons for the game to start then you may want to have this somewhere in your code.

if( (digitalRead(buttonOne) == HIGH) && (digitalRead(ButtonTwo) == HIGH) ) // assuming the buttons go HIGH when pressed.

You really have to master the basics of programming.
Does this look correct?
if pbOneTime<5000+roundTime {
digitalWrite ledTwo,HIGH
}
There are others.

You guys are absolutely right. This course moves at a pace much faster that I'm ready for! Thankfully I learn more from your help and feedback.

I showed you 3 or 4 days ago how to do this without delays, what happened?

   // flashes amber leds for 1 s. period=200
   digitalWrite (ledOne,LOW);
   digitalWrite (ledTwo,LOW);
   digitalWrite (tZero,HIGH);
   digitalWrite (tOne,HIGH);
   digitalWrite (tTwo,HIGH);
   digitalWrite (tThree,HIGH);
   delay(100);

What does the ; do here? Look at the format, is it right?

if (digitalRead)( buttonOne==HIGH);

I will redo the entire thing and post it later. I think I need a tutor, anyone interested?

Thanks

Lots of people here will give help.
You have to do your part and learn the basics.
When you run into problems ask for help.

Start small, when a portion of your code is working according to your design criterial then and only then add another section of code.

Take a look at the work Nick has done for all of us:
Here

int pb1=0; //pin 0 as button for 1st player
int led1=1; //pin 1 as button pin for second player
int pb2=2; //pin 2 as led for first player
int led2=3; //pin 3 as led for second player
int rLed=4; //pin5 for t=0 indicator led (grn)

void setup() {
pinMode(pb1, INPUT);
pinMode(led1, OUTPUT);
pinMode(pb2, INPUT);
pinMode(led2, OUTPUT);
pinMode(rLed, OUTPUT);
}

int roundTime;
int pb1time;
int pb2time;

void loop(){

if (digitalRead(pb1==HIGH) && digitalRead(pb2==HIGH)){

digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
digitalWrite(rLed,HIGH);
delay(250);
digitalWrite(rLed,LOW);
delay(250);
}
else {
digitalWrite (rLed,HIGH);
digitalWrite (led1,LOW);
digitalWrite (led2, LOW);

}

while (digitalRead(pb1)==HIGH && digitalRead(pb2)==HIGH){
digitalWrite (rLed,HIGH);
delay (50);}

if (digitalRead (pb1)==LOW){
int (pb1time=millis());
digitalWrite(led1, HIGH);
digitalWrite(led2,LOW);
}
else if (digitalRead (pb2)==LOW){
int (pb2time=millis());
digitalWrite(led2, HIGH);
digitalWrite(led1, LOW);
}
if (digitalRead(pb1time) < (roundTime) + (3550)){
digitalWrite (led2, HIGH);
delay(5000);
digitalWrite(led1, LOW);
}
else if (digitalRead(pb2time) < (roundTime) + (3550)){
digitalWrite (led1, HIGH);
delay(5000);
digitalWrite(led2, LOW);

}
else if (digitalRead(pb1time) > (roundTime) + (3550)){
digitalWrite (led1, HIGH);
delay(5000);
}
else if (digitalRead(pb1time) > (roundTime) + (3550)){
digitalWrite (led1, HIGH);
delay(5000);
}
}

Thanks for the link Larry

So here is what's happening. The red flashes regardless that the buttons or press or not. Once the two buttons are press and hold the red light will flash 7 times like it suppose too and become solid. If button 2 is release first then the green led2 turn on like it suppose too to show he's the winner. But if button one is release first, the green led 1 doesn't turn on as it's suppose too.

Thanks for the help

int pb1=0; //pin 0 as button for 1st player
int led1=1; //pin 1 as button pin for second player

Are you aware pin 0 and 1 are connected to the serial pins?
It is recommended one not use these in an application useless you know what the ramifications could be.

You cannot do a digitalRead on pb1Time as it is not a pin on the Arduino!
What is roundTime?
You never set it equal to anything.

EDIT:
I cannot urge you enough to start commenting your lines of code especially if you want help from from others.

Here you are redefining the variables over again are you sure you want to?
int pb1time;
int pb2time;
. . .
int (pb1time=millis());
. . .
int (pb2time=millis());

If you did want to redefine things then the format would be.
int pb1time=millis();

These should be type unsigned long, as is millis()
int roundTime;
int pb1time;
int pb2time;

Thank you

See the edits I made to my previous post.

Also:
int pb1time=millis();

This goes out of scope when you finish with the "if" section.
i.e. cannot be accessed out side of the "if" section.