my $new_x = $old_x + $offset{$direction}[0]; my $new_y = $old_y + $offset{$direction}[1];