Thanks, Byrin.
---
I've been taking a programming course at school. We're using Java, and now we've been making our own excercise programs based on what we've learned so far. I'm making a program that counts the score in shred30. It's not ready yet, but this is the code of the "latest version".
Code: Select all
public class Shred3 { /* Program for counting the score
in shred30 */
private static double Formula(int contacts, int uniques, int adds) {
double score = adds + (uniques * (adds / contacts));
return score;
}
public static void main(String[] args){ // MAIN PROGRAM
System.out.println("\n**** Shred30 score ****\n");
int contacts1, uniques1, adds1;
double a;
System.out.println("Give the number of contacts, unique tricks\n"+
"and adds:\n");
contacts1 = Lue.kluku();
uniques1 = Lue.kluku();
adds1 = Lue.kluku();
a = Formula(contacts1, uniques1, adds1);
System.out.println("Score is "+a+".");
}
}
I'm at school now, I'll edit/reply when I'm back home.
EDIT: If you want to use the program, you need to download Java. I think everyone's got command line / DOS in their computer (that's what you need to use the program at this point).
1. Get Java.
2. Open the Java notepad, copy&paste this code there and save it as 'Shred3.java' .
3. Open the command line and the bin and type 'javac Shred3.java' . (This checks the code, if there are errors it shows where they are; if there aren't any, you're good.

)
4. If the code is ok, type 'java Shred3' .
5. It should print
****Shred30 score****
Give the number of contacts, unique tricks and adds:
x [give the number of contacts and press enter]
y [the number of unique tricks]
z [adds, then press enter]
Score is xxx.x.
---
The next step with this program would be something where you could just give the run and it would count the score. First it may not recognize separate trick names (like Ripwalk); instead it'd ask the adds of each trick and if the trick is unique or not. Then there would be an ending signal that tells the program that the run is over.*
Finally, the program could recognize the add-count, unique-ness and the number of contacts just when you type the run there. So it could recognize the technical names.**
*So a run like "Clipper > Ripwalk > Pdx mirage > Butterfly > Ripwalk > Pdx mirage" should be typed like this "2 > unique4 > unique3 > unique3 > 4 > 3".
** Here the user wouldn't have to do anything but just type the run, like "clipper > ripwalk > pdx mirage > butterfly > ripwalk > pdx mirage" and the program would count all the adds, unique tricks and contacts and give the score.
This would be the ideal version, I'm not sure how far I can make this.

Defining all the tricks will be a huge job, plus everything has to be defined both sides.
