Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. private static int getSeed(String string) {
  2. double seed = 0;
  3. char[] chars = string.toCharArray();
  4. for (int i = 0; i < chars.length; i++) {
  5. int c = (int) chars[i];
  6. seed += c + (c / (i + 1));
  7. }
  8. if (seed < 500) {
  9. seed *= 1.75;
  10. }
  11. return (int) seed;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement