Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public void matcha()
  2. {
  3. Card pt ;
  4. Card ps ;
  5. Pile p;
  6. int counter = 0;
  7.  
  8. for (int i =0; i<piles.size();i++){
  9. p = piles.get(i);
  10. ps = p.viewTopCard();
  11.  
  12. for (int w =0; w<piles.size();w++){
  13. p = piles.get(w);
  14. pt = p.viewTopCard();
  15.  
  16. if(!(i==w)){
  17. if (pt == ps){
  18. counter++;
  19. }
  20.  
  21. }
  22. }
  23. }
  24. if(counter >= piles.size()-1){
  25. System.out.println("matcha");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement