Removing Duplication 0 ▲ ronjeffries.com 183 days ago · 10 min read2061 words · Tech · hide · Fediverse post 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':… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town