$delta = array(
        DIRECTION_NORTH => array( 0, 1 ),
        DIRECTION_EAST => array( 1, 0 ),
        ...
    )[ $creature->intent->direction ];
    $newx = $creature->locationx + $delta[ 0 ];
    etc.