Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void matcha()
- {
- Card pt ;
- Card ps ;
- Pile p;
- int counter = 0;
- for (int i =0; i<piles.size();i++){
- p = piles.get(i);
- ps = p.viewTopCard();
- for (int w =0; w<piles.size();w++){
- p = piles.get(w);
- pt = p.viewTopCard();
- if(!(i==w)){
- if (pt == ps){
- counter++;
- }
- }
- }
- }
- if(counter >= piles.size()-1){
- System.out.println("matcha");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement