![]() |
|
| Welcome, Unregistered! |
|
| |
| Copy And Paste!!! | ||||||||
|
| |||||
|
#11 | |||||
Join Date: Oct 2005 Location: Penn 2 The sylvania
Posts: 69 | \¯\/¯/ |¯|)¯) /¯/\¯\ \¯\/¯/ GT:IZI NoXiOuS IZI /_/\_\ |_|)_) \_\/_/ /_/\_\ ![]() I copied my sig from H2F to my MLG pro sig.
__________________ ![]() Team Hardcore is not a nice place for kids. It is a bad, bad, dangerous, lead-filled death-hole. | |||||
| Sponsored Links |
| |
| Copy And Paste!!! | ||||||||
|
| |||||
|
#13 | |||||
| | #!/bin/sh url="http://slashdot.org/index.rss" curl --silent "$url" | grep -E '(title>|description>)' \ sed -n '4,$p' | \ sed -e 's/<title>//' -e 's/</title>//' -e 's/<description>/ /' \ -e 's/<\/description>//' +programming project at school..
__________________ ![]() GT : xpL Zen | |||||
| Copy And Paste!!! | ||||||||
|
| |||||
|
#15 | |||||
Join Date: Aug 2005 Location: Pittsburgh
Posts: 725 | import java.text.NumberFormat; import java.text.DecimalFormat; import java.io.*; /** * * @author CB3 */ public class StatList { private DecimalFormat twoPlaces = new DecimalFormat("0.##"); private NumberFormat doPercent = NumberFormat.getPercentInstance(); private String name; private String longest = ""; private int games = 0; private int win = 0; private int losses = 0; private int totalGuessesMade = 0; private int winStreak = 0, lossStreak = 0; private int longWinStreak = 0, longLossStreak = 0; private double averageGuesses; private double winPercent; public StatList(String playerName) { name = new String(playerName); } public void countWins() { win++; } public void countLosses() { losses++; } public void countGames() { games++; } //*EXTRA CREDIT* // First method determines the total guesses used - only called during wins public void guessesUsed(int guessesMade) { totalGuessesMade += guessesMade; } // Next method averages the guesses used per win public void countAverage() { averageGuesses = (double) totalGuessesMade / (double) win; } // Determines win percentage public void winPercentage() { winPercent = (double) (win) / (double) (games); } // Method determines longest word deciphered public void makeLongest(String longestWord) { if(longestWord.length() > longest.length()) longest = longestWord; } // Method determines longest streaks for wins & losses public void countStreak(int Choice) { if(Choice == 1) //Rather than checking if they had given up { //or had run out of guesses, the main program winStreak++; //will send the int 1 for wins and 0 losses if(winStreak > longWinStreak) longWinStreak = winStreak; } else { lossStreak++; if(lossStreak > longLossStreak) longLossStreak = lossStreak; } } // Method resets streak depending on loss/win public void streakReset(int Choose) { if(Choose == 1) //Same procedure as above winStreak = 0; else lossStreak = 0; } public String toString() //Neat output of all data founded in StatList class { StringBuffer showOutput = new StringBuffer(); System.out.println(); showOutput.append("Name: " + name + "\n"); showOutput.append("Games Played: " + games + "\n"); showOutput.append("Wins: " + win + "\n"); showOutput.append("Losses: " + losses + "\n"); showOutput.append("Winning Percentage: ~" + doPercent.format(winPercent) + "\n"); showOutput.append("Average Guesses Needed [Wins Only]: " + twoPlaces.format(averageGuesses) + "\n"); showOutput.append("Longest Word Deciphered: " + longest + " < " + longest.length() + " characters long >\n"); showOutput.append("Longest Win Streak: " + longWinStreak + " games\n"); showOutput.append("Longest Loss Streak: " + longLossStreak + " games\n"); return showOutput.toString(); } } Yay for Java!
__________________ ![]() ^Thanks Thorgasm. Quote:
| |||||
| Copy And Paste!!! | ||||||||
|
| |||||
|
#17 | |||||
| | theres also "im deep inside your children" lol | |||||
| Copy And Paste!!! | ||||||||
|
| |||||
|
#18 | |||||
| | http://www.bungie.net/Stats/GameStat...r=OG%20SoLdIeR i was looking at it then noticed hey that guys the same guy as the other guy and thier on different teams how the f..k does that work. hmm | |||||
| Copy And Paste!!! | ||||||||
|
| |||||
|
#19 | |||||
| | ||||||
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
|