Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/socha/_socha.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ class GameState:
last_move_mono: dict[Color, bool] | None = None,
) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __ne__(self, other: object) -> bool: ...

def deepcopy(self) -> GameState:
"""Erstellt eine unabhängige Kopie des Spielstandes."""

def round(self) -> int:
"""Die aktuelle Rundenzahl."""
Expand Down
4 changes: 4 additions & 0 deletions src/plugin2027/game_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ impl GameState {
}
}

fn __eq__(&self, other: &GameState) -> bool {self == other}
fn __ne__(&self, other: &GameState) -> bool {self != other}
fn deepcopy(&self) -> GameState {self.clone()}

fn round_from_turn(&self, turn: usize) -> usize {
1 + turn / Constants::COLORS
}
Expand Down
Loading