fix the cell pydantic cause the program was too long

This commit is contained in:
Maoake Teriierooiterai
2026-03-24 15:34:43 +01:00
parent 993bcce857
commit c478400640
2 changed files with 9 additions and 12 deletions
+5 -3
View File
@@ -1,8 +1,10 @@
from pydantic import BaseModel, Field
from dataclasses import dataclass
class Cell(BaseModel):
value: int = Field(ge=0, le=15)
@dataclass
class Cell:
def __init__(self, value: int) -> None:
self.value = value
def __str__(self) -> str:
return hex(self.value).removeprefix("0x").upper()