Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. import java.util.Arrays;
  2. import java.util.Collections;
  3. import java.util.List;
  4.  
  5. public class Aug30 {
  6.  
  7. public String[] deckShuffle(String[] deck){
  8. List<String> sortDeck = Arrays.asList(deck);
  9. Collections.shuffle(sortDeck);
  10. deck = (String[])sortDeck.toArray(new String[sortDeck.size()]);
  11. return deck;
  12. }
  13.  
  14. public String[] drowCards(String[] deck){
  15. String[] hands = new String[5];
  16. System.out.println("あなたの初期手札は");
  17. for(int i=0;i<5;i++){
  18. hands[i] = deck[i];
  19. System.out.println(hands[i]);
  20. }
  21. return hands;
  22. }
  23.  
  24. public void checkKaiser(String[] hands){
  25. int point = 0;
  26. for(int i=0;i<5;i++){
  27. if(hands[i]=="サイバー・ドラゴン" || hands[i]=="パワー・ボンド" || hands[i]=="ハーピィの羽箒"){
  28. point++;
  29. }
  30. }
  31. System.out.println("あなたのサイバー流継承率は"+(point*20)+"%です。");
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement