from __future__ import annotations

import typing as tp
import enum

class Winner(enum.IntEnum):
    DRAW = 0
    FIRST = 1
    PASSIVE = 2


class Action(tp.Protocol):
    def __eq__(self, other: Action) -> bool: ...
    def __hash__(self) -> int: ...


class Game(tp.Protocol):
    def __eq__(self, other: Game) -> bool: ...
    def __hash__(self) -> int: ... 
    def update(self, action: Action) -> None: ...
    def updated(self, action: Action) -> Game: ...
    def actions(self) -> list[Action]: ...
    def finished(self) -> bool: ...
    def winner(self) -> Winner: ...
    def copy(self) -> Game: ...