We’re Not Really Strangers

class main.components.wnrs.WNRS

The WNRS object contains functions used for We’re Not Really Strangers tab

Methods:

convert_to_save_format()

Convert data to save format

convert_to_store_format()

Convert data to save format

get_all_cards()

Get all cards to retrieve playable cards

get_all_playable_cards(list_of_deck)

Initialize playing cards and index from list of deck for game play

get_current_card()

Get current card

get_information()

Get information (type, description, summary) of all card deck

get_next_card()

Get next card

get_previous_card()

Get previous card

initialize_game([list_of_deck])

Initialize new game

load_game(list_of_deck, pointer, index)

Load existing game from deck selection

load_game_from_dict(game_dict)

Load existing game from dictionary

shuffle(index)

Shuffle algorithm to preserve 'final' cards location

shuffle_remaining_cards()

Shuffle remaining cards, return next card

convert_to_save_format() Dict[str, Any]

Convert data to save format

convert_to_store_format() Dict[str, Any]

Convert data to save format

get_all_cards() Dict[str, str]

Get all cards to retrieve playable cards

get_all_playable_cards(list_of_deck: List[str])

Initialize playing cards and index from list of deck for game play

Parameters:

list_of_deck – list of all selected games to play

get_current_card()

Get current card

Returns:

card deck, prompt, style, counter

Return type:

(list, list, dict, str)

get_information() Dict[str, Dict[str, Any]]

Get information (type, description, summary) of all card deck

get_next_card()

Get next card

Returns:

card deck, prompt, style, counter

Return type:

(str, list, dict, str)

get_previous_card()

Get previous card

Returns:

card deck, prompt, style, counter

Return type:

(str, list, dict, str)

initialize_game(list_of_deck: List[str] | None = None)

Initialize new game

Parameters:

list_of_deck – list of all selected games to play

load_game(list_of_deck: List[str], pointer: int, index: List[int])

Load existing game from deck selection

Parameters:
  • list_of_deck – list of all selected games to play

  • pointer – current pointer of card

  • index – order of cards to play

load_game_from_dict(game_dict: Dict[str, Any])

Load existing game from dictionary

Parameters:

game_dict (dict) – dictionary of existing game

shuffle(index: List[int]) List[int]

Shuffle algorithm to preserve ‘final’ cards location

Parameters:

index – list of index to be shuffled

Returns:

shuffled index

shuffle_remaining_cards()

Shuffle remaining cards, return next card

Returns:

card deck, prompt, style, counter

Return type:

(str, list, dict, str)