示例#1
0
	def visualize(self, media, path):
		if "animate" in media: 
			animated(self.data_single, self.goal_single, title="Single time")
			animated(self.data_double, self.goal_double, paused=True, title="Double time")
		if "svg" in media: 
			svg(self.data_single, path + "_single.svg")
			svg(self.data_double, path + "_double.svg")
		if "png" in media: 
			png(self.data_single, path + "_single.png")
			png(self.data_double, path + "_double.png")
		if "mov" in media: 
			animated(self.data_single, self.goal_single, path=path+"_single.mp4")
			animated(self.data_double, self.goal_single, path=path+"_double.mp4")
		if "positions" in media: 
			io.positions_to_file(path + "_positions.txt", self.positions)
		if "mission" in media:
			io.mission_to_file(path + "_mission_data.txt", 
				self.time_single, self.time_double,
				self.traveled_single, self.traveled_double,
				self.collected_single, self.collected_double)

		tkMessageBox.showinfo("Success", "Data has been visualized!")
示例#2
0
	def save_positions(self, path):
		io.positions_to_file(path, self.positions)