#define esc 0x1b
int row=32;
int row1=70;
int button=0;
int button1=0;
int shote=99;
int shota=99;
int lifse=50;
int lifsa=50;
void setup(){
pinMode (13, INPUT);
pinMode (12, INPUT);
pinMode (10, OUTPUT);
pinMode (9, OUTPUT);
Serial.begin(57600);
Serial.write(esc);
Serial.write(69);
Serial.write(esc);
Serial.write(89);
Serial.write(44);
Serial.write(32);
Serial.println(" INFINITY BOX");
Serial.println(" ");
Serial.println(" by EXPLORER electronics");
delay(10000);
while(button==LOW){
Serial.write(esc);
Serial.write(69);
Serial.println("player 1 your controller is flashing");
Serial.println(" you are earth");
Serial.println("you can use your A key to skip title");
Serial.println("use the dial to move");
Serial.println("use the A button to shoot");
Serial.println("in the top left corner you will see:");
Serial.println("E:Sxx,Lxx");
Serial.println("the first number is shots remaining");
Serial.println("the second number is lives remaining");
Serial.println("press A to continue");
digitalWrite(10,HIGH);
delay(500);
digitalWrite(10,LOW);
delay(500);
button=digitalRead(13);
}
while(button1==LOW){
Serial.write(esc);
Serial.write(69);
Serial.println("player 2 your controller is flashing");
Serial.println(" you are the aliens");
Serial.println("you have no control of the title");
Serial.println("use the dial to move");
Serial.println("use the A button to shoot");
Serial.println("in the top right corner you will see:");
Serial.println("A:Sxx,Lxx");
Serial.println("the first number is shots remaining");
Serial.println("the second number is lives remaining");
Serial.println("press A to continue");
digitalWrite(9,HIGH);
delay(500);
digitalWrite(9,LOW);
delay(500);
button1=digitalRead(12);
button=digitalRead(13);
}
while(button==LOW){
Serial.write(esc);
Serial.write(69);
Serial.println(" SPACE WARS EP.1 ");
Serial.println(" 'the quest for bacon'");
Serial.println(" ");
Serial.println("this is earth --------> E ");
Serial.println(" ");
Serial.println("It was just chillin' in space...but");
Serial.println(" ");
Serial.println("then these guys showed up------> A");
Serial.println(" ");
Serial.println("and earth was all like 'yo!'");
Serial.println("and then the aliens were all pew pew");
Serial.println("and then earth was all let's get em!");
Serial.println("and so they built the");
Serial.println("ss 'EQUALS EARTH GREATER THAN'");
Serial.println("....");
Serial.println("anyhoo you're in charge of it ");
Serial.println("so good luck 'cause if you loose");
Serial.println("the aliens will steal all our pigs!");
Serial.println("....");
Serial.println("so fight for bacon!");
Serial.println("");
Serial.println("earth: =E> aliens: ");
Serial.write(esc);
Serial.write(89);
Serial.write(row1);
Serial.write(67);
Serial.println("-----------------------------------");
shote=shote-1;
}
button1=digitalRead(12);
if (button1==HIGH&&shota!=0&&row1==row){lifse=lifse-1;}
if (button1==HIGH&&shota==0){goto here;}
else if (button1==HIGH){Serial.write(esc);
Serial.write(89);
Serial.write(row1);
Serial.write(32);
Serial.println("===================================