Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int[] hovaLehet(int x, int y, VilagDef.TJatekos jatekos) {
- boolean megvan = false;
- for (int i = 0; i < 10; i++) {
- for (int j = 0; j < 10; j++) {
- if (x >= 0 && x < 100 && y >= 0 && y < 100) {
- if (jatekos.Vilag[y+i][x+j].Objektum == VilagDef.cvMezo && jatekos.Vilag[y][x+j].Objektum == VilagDef.cvMezo && jatekos.Vilag[y+i][x].Objektum == VilagDef.cvMezo &&
- jatekos.Vilag[y-i][x-j].Objektum == VilagDef.cvMezo && jatekos.Vilag[y][x-j].Objektum == VilagDef.cvMezo && jatekos.Vilag[y-i][x].Objektum == VilagDef.cvMezo &&
- jatekos.Vilag[y-i][x+j].Objektum == VilagDef.cvMezo && jatekos.Vilag[y+i][x-j].Objektum == VilagDef.cvMezo) {
- return new int[]{x,y};
- }
- }
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement