#NEWLINE# @ register . inclusion_tag ( 'manoria/_map.html' ) #NEWLINE# def render_map( mapable ) : #NEWLINE# #INDENT# empty_cells = [ ] #NEWLINE# allocation = [ map ( int , a . split ( ',' ) ) for a in mapable . allocation . split ( ) ] #NEWLINE# for x in range ( 1 , ( mapable . size [ 0 ] + 1 ) ) : #NEWLINE# #INDENT# for y in range ( 1 , ( mapable . size [ 1 ] + 1 ) ) : #NEWLINE# #INDENT# if ( ( x , y ) in allocation ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# empty_cells . append ( EmptyCell ( x , y , mapable ) ) #NEWLINE# #UNINDENT# #UNINDENT# return { #NEWLINE# #INDENT# 'mapable' : mapable , #NEWLINE# 'cells' : itertools . chain ( empty_cells , mapable . cells ( ) ) , #NEWLINE# #UNINDENT# }