There is Massive Duplication in my texture-finding code. I plan to remove that. It goes rather nicely. Here’s the duplication that I have in mind: class RoomView: path = '/Users/ron/PycharmProjects/dungeon/assets/images/' texture_dictionary = { '': arcade.load_texture(path+'Tile (21).png'), # none 'E': arcade.load_texture(path+'Floor_Edge_29.png'), # east 'N': arcade.load_texture(path+'Floor_Edge_36.png'), # north 'EN': arcade.load_texture(path+'Wall_81.png'), 'W': arcade.load_texture(path+'Floor_Edge_33.png'), # west 'EW': arcade.load_texture(path+'Wall_67.png'), 'NW': arcade.load_texture(path+'Wall_80.png'), 'ENW': arcade.load_texture(path+'Wall_66.png'), 'S': arcade.load_texture(path+'Floor_Edge_25.png'), # south 'ES': arcade.load_texture(path+'Wall_55.png'), 'NS': arcade.load_texture(path+'Wall_3.png'), 'ENS': arcade.load_texture(path+'Wall_4.png'), 'WS': arcade.load_texture(path+'Wall_53.png'), 'EWS': arcade.load_texture(path+'Wall_69.png'), 'NWS':…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.