Thursday, May 17, 2012

Things I did today


Code for the Brown Center


Start At (Counter 1, Top Left);
Start At (Counter 2, Top Right);
Start At (Counter 3, Bottom Left);
Start At (Counter 4, Bottom Right);

Walk (Counter 1, Downstairs);
Walk (Counter 2, Downstairs);
Walk (Counter 3, Upstairs);
Walk (Counter 4, Upstairs);

Repeat {
If (Counter 1 is in the middle AND counter 4 is in the middle){
            High Five (Counter 1, Counter 4);
}
Else (Counter 1 is in the middle but Counter 4 is not in the middle){
            Stop (Counter 1);
}
Else (Counter 4 is in the middle but Counter 1 is not in the middle){
            Stop (Counter 4);
}

If (Counter 1 is in the middle AND Counter 3 is in the middle){
            Pound (Counter 1, Counter 3);
}
Else (Counter 1 is in the middle but Counter 3 is not in the middle) {
            Stop (Counter 1);
}
Else (Counter 3 is in the middle but Counter 1 is not){
            Stop (Counter 3);
}
If (Counter 1 has High Fived AND Pounded){
            Walk (Counter 1, Downstairs);
}
If (Counter 4 has High Fived AND Fist Pounded){
            Walk (Counter 4, Upstairs);
}
If (Counter 2 is in the middle AND Counter 3 is in the middle){
            High Five (Counter 2, Counter 3);
}
Else (Counter 2 is in the middle but Counter 3 is not in the middle){
            Stop (Counter 2);
}
Else (Counter 3 is in the middle but Counter 2 is not in the middle){
            Stop (Counter 3);
}
If (Counter 2 is in the middle AND Counter 4 is in the middle){
            Pound (Counter 2, Counter 4);
}

Else (Counter 2 is in the middle but Counter 4 is not in the middle){
            Stop (Counter 2);
}

Else (Counter 4 is in the middle but Counter 2 is not in the middle){
            Stop (Counter 4);
}
If (Counter 2 has High Fived AND Pounded){
            Walk (Counter2, Downstairs);
}
If (Counter 2 has High Fived AND Fist Pounded){
            Walk (Counter 3, Upstairs);
}
If (Counter 1 is at the bottom of the stairs AND Counter 2 is at the bottom of the stairs){
            Hand Shake (Counter 1, Counter 2);
}
Else (Counter 1 is a the bottom of the stairs but Counter 2 is not at the bottom of the stairs) {
            Stop (Counter 1);
}
Else (Counter 2 is at the bottom of the stairs but Counter 1 is not at the bottom of the stairs){
            Stop (Counter 2);
}
If (Counter 3 is at the top of the stairs AND Counter 4 is at the top of the stairs){
            Hand Shake (Counter 3, Counter 4);
}
Else (Counter 3 is at the top of the stairs but Counter 4 is not at the top of the stairs){
            Stop (Counter 3);
}
Else (Counter 4 is at the top of the stairs but Counter 3 is not at the top of the stairs){
            Stop (Counter 4);
}

If (Counter 3 is at the top of the stairs AND Counter 4 is at the top of the stairs AND Counter 1 is at the bottom of the stairs AND Counter 2 is at the bottom of the stairs){
            End;
}


}

No comments:

Post a Comment