simply write as 
return testMap(player, dx, dy)