Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isHorizontalMatch(int x, int y, String texture){
- if (x == 0) {
- System.out.println("x= "+x);
- return (texture == gems[x+1][y].l && texture == gems[x+2][y].l);
- }
- else if (x == 7) return (texture == gems[x-1][y].l && texture == gems[x-2][y].l);
- else if (x == 1) {
- System.out.println("x= "+x);
- return ((texture == gems[x+1][y].l && texture == gems[x+2][y].l) || (texture == gems[x-1][y].l && texture == gems[x+1][y].l));
- }
- else if (x == 6) return ((texture == gems[x-1][y].l && texture == gems[x-2][y].l) || (texture == gems[x-1][y].l && texture == gems[x+1][y].l));
- else return ((texture == gems[x+1][y].l && texture == gems[x+2][y].l)
- || (texture == gems[x-1][y].l && texture == gems[x+1][y].l)
- || (texture == gems[x-1][y].l && texture == gems[x-2][y].l));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement