public void act(JManBoard board) {
         int newx = getX();
         int newy = getY();
        if (!hasActed()) {
            int prob = JManApp.rand(0,11);
            
            if (prob == 0) {
                    newx = getX() + 1;
                    newy = getY();
                }
            if (prob == 1) {
                    newx = getX() - 1;
                    newy = getY();
                }
             if (prob == 2) {
                    newx = getX();
                    newy = getY()+ 1;
                }
              if (prob == 3) {
                    newx = getX();
                    newy = getY() - 1;
                }
                
                if (board.isOnBoard(newx,newy) == false) {
                    newx = Math.min(newx,19);
                    newx = Math.max(newx,0);
                    newy = Math.min(newy,19);
                    newy = Math.max(newy,0);
                }
                    
                    if (board.isEmpty(newx,newy)) {
                        board.move(getX(),getY(),newx,newy);
                    }
            }
        }