/*
This program is for the 2014 RoboPlay Competition (Video) http://c-stem.ucdavis.edu
Video Title:  Three Days of the Civil War
School Name:  School of Engineering & Sciences
School District:  Sacramento City Unified School District
Student Names:  Raihana Yarzada, Samantha Hight, Alexis Adolpho, Melody Fussell, Yeva Gracheva, Jebeh Jaa
Teacher Advisor:  Ms. Dylan Besk
*/
 
#include<linkbot.h>
CLinkbotI robot1, robot2, robot3, robot4, robot5;
CLinkbotI robot6, robot7, robot8, robot9, robot10;
CLinkbotI robot11, robot12, robot13, robot14;
CLinkbotIGroup groupA, groupB;
CLinkbotIGroup group1, group2, group3, group4;
//Gettysburg
groupA.addRobot(robot1);
groupA.addRobot(robot2);
groupA.addRobot(robot3);
groupA.addRobot(robot4);
groupA.addRobot(robot5);
groupA.addRobot(robot6);
groupA.addRobot(robot7);
groupB.addRobot(robot8);
groupB.addRobot(robot9);
groupB.addRobot(robot10);
groupB.addRobot(robot11);
groupB.addRobot(robot12);
groupB.addRobot(robot13);
groupB.addRobot(robot14);
group1.addRobot(robot1);
group1.addRobot(robot2);
group2.addRobot(robot2);
group2.addRobot(robot3);
group3.addRobot(robot1);
group3.addRobot(robot2);
group3.addRobot(robot3);
group4.addRobot(robot4);
group4.addRobot(robot5);
 
robot1.connect();
robot2.connect();
robot3.connect();
robot4.connect();
robot5.connect();
robot6.connect();
robot7.connect();
robot8.connect();
robot9.connect();
robot10.connect();
robot11.connect();
robot12.connect();
robot13.connect();
robot14.connect();
 
//beginning of day 1
robot1.moveForward(200);
robot2.delaySeconds(2);
robot2.turnLeft(90, 1.75, 3.75);
 
//blocks 1 & 2
group1.moveDistance(-.25, 1.75);
group1.moveDistance(.25, 1.75);
 
group2.moveDistance(-.25, 1.75);
group2.moveDistance(.25, 1.75);
 
group1.moveDistance(-.25, 1.75);
group1.moveDistance(.25, 1.75);
 
//blocks 3 & 4
group3.moveDistance(3, 1.75);
group3.moveDistance(-.25, 1.75);
group3.moveDistance(-.25, 1.75);
 
group4.moveDistance(3, 1.75);
group4.moveDistance(-.25, 1.75);
group4.moveDistance(-.25, 1.75);
 
//Pickett's Charge
groupA.moveForward(400);
groupA.resetToZero();
groupA.moveForward(720);