Пример #1
0
def draw_city(canvas, offset, top, constants):
	front = get_city_front_face_coords(constants)
	
	canvas.create_polygon(
		*to_tkinter_coords(front, top, offset),
		fill = "red",
		outline = "black"
	)
	
	canvas.create_polygon(
		*to_tkinter_coords(get_short_tower_coords(constants, front), top, offset),
		fill = "red",
		outline = "black"
	)
	
	canvas.create_polygon(
		*to_tkinter_coords(get_tall_tower_coords(constants, front), top, offset),
		fill = "red",
		outline = "black"
	)
Пример #2
0
def draw_settlement(canvas, offset, top, constants):
	'''Draw the settlement given certain constants.'''

	front = get_front_face_coords(offset, constants)

	canvas.create_polygon(
		*to_tkinter_coords(front, top),
		fill="blue",
		outline="black"
	)
	
	canvas.create_polygon(
		*to_tkinter_coords(get_side_roof_coords(offset, constants, front), top),
		fill="blue",
		outline="black"
	)
	
	canvas.create_polygon(
		*to_tkinter_coords(get_side_coords(offset, constants, front), top),
		fill="blue",
		outline="black"
	)