From a594395cbf36475442dee7ec6c4c5ca908728002 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 18 Nov 2019 08:45:56 -0600 Subject: [PATCH] timing and remove unused calc func day 10 --- 2018/day-10/python/main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/2018/day-10/python/main.py b/2018/day-10/python/main.py index b9d9407..09356ad 100644 --- a/2018/day-10/python/main.py +++ b/2018/day-10/python/main.py @@ -1,12 +1,11 @@ import re import os import sys +import time import numpy as np import matplotlib.pyplot as plt -from collections import namedtuple - # Constants @@ -24,9 +23,6 @@ class MovingPoint(object): self.pos = [int(match.group(1)), int(match.group(2))] self.vel = [int(match.group(3)), int(match.group(4))] - def calculate(self, t): - return Point(self.pos[0] + (self.vel[0] * t), self.pos[1] + (self.vel[1] * t)) - def simulate(self, t=1): self.pos[0] += self.vel[0] * t self.pos[1] += self.vel[1] * t @@ -34,6 +30,8 @@ class MovingPoint(object): def __repr__(self): return f"