public List<Point> getBorder(int x,int y){
        ArrayList<Point> tmp = new ArrayList<Point>();
        if(x>0){
            tmp.add(new Point(x-1,y));
            
            if(y>0){
                tmp.add(new Point(x-1,y-1));
            }if (y<board.length-1){
                tmp.add(new Point(x-1,y+1));
            }
        }
        if(x<board[y].length-1){
            tmp.add(new Point(x+1,y));
            
            if(y>0){
                tmp.add(new Point(x+1,y-1));
            }if(y<board.length-1){
                tmp.add(new Point(x+1,y+1));
            }
        }
        if(y>0){
            tmp.add(new Point(x,y-1));
        }
        if(y<board.length-1){
            tmp.add(new Point(x,y+1));
        }
        
        return tmp;
    }