Bitmap/Python: Difference between revisions

→‎Alternative version: since the default background is white, it makes sense to make the default paint color black (this is also required by Bitmap/Bresenham's_line_algorithm#Python)
(→‎Alternative version: since the default background is white, it makes sense to make the default paint color black (this is also required by Bitmap/Bresenham's_line_algorithm#Python))
Line 104:
print('\n'.join(reversed(txt)))
 
def set(self, x, y, colour=black):
assert type(colour) == Colour
self.map[y][x]=colour
Anonymous user