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"