From 969d8f1a0fda2b7d1e585baf8d0ea12e5e1dd6c4 Mon Sep 17 00:00:00 2001 From: Auric Vente Date: Tue, 23 Jul 2024 03:59:08 -0600 Subject: [PATCH] Mods --- cromulant/game.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cromulant/game.py b/cromulant/game.py index 6fc3c9a..c98e7e9 100644 --- a/cromulant/game.py +++ b/cromulant/game.py @@ -1,6 +1,7 @@ from __future__ import annotations import random +from dataclasses import dataclass from PySide6.QtWidgets import QHBoxLayout # type: ignore from PySide6.QtWidgets import QVBoxLayout @@ -23,10 +24,10 @@ from .window import Window from .settings import Settings +@dataclass class Opt: - def __init__(self, value: int, weight: int) -> None: - self.value = value - self.weight = weight + value: int + weight: int class Method: