public void isTwoFromStation(Block b){
                Block s, next;
                s = b;
                double distance = 0;
                if(s.isStation())
                {
                    int a = s.getPrevBlockId();
                    s =  trackObject.getBlock(a);
                }
                next = s;
                int i = 0;
                while(true)
                {
                    if(next.isStation())
                    {
                        i++;
                        break;
                    }
                    else
                    {
                        //System.out.println(next.getPrevBlockId());
                        next = trackObject.getBlock(next.getPrevBlockId());
                        i++;
                    }
                }
                if(i == 2)
                    b.setTwoFromStation(true);
                else
                    b.setTwoFromStation(false);
            }