Remove PyPi build, convert project to not be a python module, add Docker build and files, update README,

This commit is contained in:
csd4ni3l
2025-10-23 11:01:21 +02:00
parent a9b5a53bdb
commit 391d55edba
16 changed files with 77 additions and 60 deletions

22
pattern.py Normal file
View File

@@ -0,0 +1,22 @@
import json
class Pattern():
def __init__(self, data: list[tuple]):
self.data: list[tuple] = data
@classmethod
def from_str(cls, string):
return cls([tuple(map(int, pos.split(","))) for pos in json.loads(string)])
@classmethod
def from_json_str(cls, data):
return cls(list(map(tuple, json.loads(data))))
def to_json_str(self):
return json.dumps(self.data)
def __eq__(self, value):
if not isinstance(value, Pattern):
return False
return set(self.data) == set(value.data)