From fd5904153e5222d97b69d9fbca790c0e98f7ccec Mon Sep 17 00:00:00 2001 From: Donovan Date: Thu, 27 Jun 2024 14:05:02 -0500 Subject: [PATCH] remove max_value --- src/models.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/models.py b/src/models.py index f710d20..8d82aa9 100644 --- a/src/models.py +++ b/src/models.py @@ -131,7 +131,6 @@ class InnerKey(DarcKey): class AlphabetKey(DarcKey): key_type: DarcKeyType = DarcKeyType.alphabet - max_value: int = 255 @classmethod def init_matrix(cls, width: int, height: int, max_value: int): @@ -145,20 +144,18 @@ class AlphabetKey(DarcKey): class Mask(DarcKey): key_type: DarcKeyType = DarcKeyType.alphabet - max_value: int = 255 @classmethod def init_matrix(cls, width: int, height: int, col_mask: int): """ originally buildScramble """ - - mask = cls._random_mask(width, cls.max_value) + max_value = 255 + mask = cls._random_mask(width, max_value) matrix = [[0 for _ in range(width)] for _ in range(height)] if col_mask < height: matrix[col_mask] = mask return Mask( matrix=matrix, - max_value=cls.max_value )