Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package defult;
- import java.util.*;
- public class DominMain
- {
- public static void main(String[] args)
- {
- boolean takin;
- Domino[] a = new Domino[10];
- for(int i = 0 ; i < a.length ; i ++)
- {
- a[i] = new Domino();
- }
- for(int i = 0 ; i < a.length ; i++)
- {
- a[i].toString();
- }
- for(int i = 0 ; i < a.length-1 ; i ++)
- {
- takin = false;
- if (a[i].getX() == a[i+1].getX() || a[i].getX() == a[i+1].getY() || a[i].getY() == a[i+1].getX() || a[i].getY() == a[i+1].getY())
- {
- takin = true;
- System.out.println("Takin: " + "[" + a[i].toString() + "]" + "|" + "[" + a[i+1].toString() + "]");
- }
- else System.out.println("Lo Takin: " + "[" + a[i].toString() + "]" + "|" + "[" + a[i+1].toString() + "]");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement