Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.Collections;
- import java.util.List;
- public class Aug30 {
- public String[] deckShuffle(String[] deck){
- List<String> sortDeck = Arrays.asList(deck);
- Collections.shuffle(sortDeck);
- deck = (String[])sortDeck.toArray(new String[sortDeck.size()]);
- return deck;
- }
- public String[] drowCards(String[] deck){
- String[] hands = new String[5];
- System.out.println("あなたの初期手札は");
- for(int i=0;i<5;i++){
- hands[i] = deck[i];
- System.out.println(hands[i]);
- }
- return hands;
- }
- public void checkKaiser(String[] hands){
- int point = 0;
- for(int i=0;i<5;i++){
- if(hands[i]=="サイバー・ドラゴン" || hands[i]=="パワー・ボンド" || hands[i]=="ハーピィの羽箒"){
- point++;
- }
- }
- System.out.println("あなたのサイバー流継承率は"+(point*20)+"%です。");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement