refactor tile type case statement to data structure lookup