Skip to content

Commit

Permalink
[config] Init functions accept key set
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometheus3375 committed Jul 18, 2024
1 parent 0309a7e commit 0c69960
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions solve/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .players import *
from .shapes import *
from .states import *
from .key_sets import KeySetType

number2shape = {
0: circle,
Expand Down Expand Up @@ -32,14 +33,17 @@ class Config:
is_doing_triumph: bool
last_position: PositionsType | None

def init_rooms(self, /) -> tuple[StateOfAllRooms, dict[PositionsType, str]]:
def init_rooms(
self,
key_set: KeySetType,
/,
) -> tuple[StateOfAllRooms, AliasMappingType]:
"""
Creates the initial state of all solo rooms using this config
with a mapping of positions to player aliases.
Creates the initial state of all solo rooms using this config.
"""
return init_rooms_from_players(self.players, self.inner_shapes)
return init_rooms_from_players(self.players, self.inner_shapes, key_set)

def init_statues(self, /) -> StateOfAllStatues:
def init_statues(self, key_set: KeySetType, /) -> StateOfAllStatues:
"""
Creates the initial state of all statues in the main room using this config.
"""
Expand All @@ -50,6 +54,7 @@ def init_statues(self, /) -> StateOfAllStatues:
middle_held_shape=self.held_shapes[1],
right_inner_shape=self.inner_shapes[2],
right_held_shape=self.held_shapes[2],
key_set=key_set,
)


Expand Down

0 comments on commit 0c69960

Please sign in to comment.