public boolean canMove()
    {
        World myWorld = getWorld();
        int x = getX();
        int y = getY();
            
        switch(direction) {
            case SOUTH :
                y++;
                break;
            case EAST :
                x++;
                break;
            case NORTH :
                y--;
                break;
            case WEST :
                x--;
                break;
        }
            
        // test for outside border
        List<Square> ofSquares = myWorld.getObjectsAt( x, y, Square.class );
        
        if (x >= myWorld.getWidth() || y >= myWorld.getHeight()) {
            return false;
        }
        else if (x < 0 || y < 0) {
            return false;
        }        
        else if( !ofSquares.isEmpty()){
            return false;
        }
        
        return true;
    }