def __init__(self, other_screens, speed_factor=1):
     """Initialise the state"""
     self.board_totals = {}
     self.other_screens = other_screens
     #
     self.all_cards = card.getCollections('cards.txt')
     self.sound_play_card = sound.Sounds.getSound('240777__f4ngy__dealing-card.wav')
     self.sound_flip_card = sound.Sounds.getSound('240776__f4ngy__card-flip.wav')
     self.sound_click = sound.Sounds.getSound('215772__otisjames__click.wav')
     self.sound_increase = sound.Sounds.getSound('173000__keykrusher__bicycle-bell-2.wav')
     self.sound_decrease = sound.Sounds.getSound('173000__keykrusher__bicycle-bell-2-reverse.wav')
     self.sound_reset = sound.Sounds.getSound('238286__meroleroman7__clip.wav')
     self.sound_instruction = sound.Sounds.getSound('115363__theditor__drop.wav')
     self.sound_dice = sound.Sounds.getSound('185985__2bach__dice-6-shake-fast-in-cup.wav')
     self.sound_success = sound.Sounds.getSound('242501__gabrielaraujo__powerup-success.wav')
     self.sound_failure = sound.Sounds.getSound('66695__mad-monkey__power08.wav')
     self.sound_capture = sound.Sounds.getSound('165331__ani-music__tubular-bell-of-death.wav')
     self.sound_dealer = sound.Sounds.getSound('165206__metaepitome__water-drop-sound.wav')
     #
     super(GameState, self).__init__(S_SETUP_START, speed_factor)
 def initUI(self):
     """Initialise the UI"""
     self.background = drawable.DrawableGroup([
         sprite.Sprite('bare-table.png', S.Screen.width / 2, S.Screen.height / 2),
         sprite.Sprite('logo.png', S.StartScreen.logo_position[0], S.StartScreen.logo_position[1]),
         sprite.Sprite('sub-logo.png', S.StartScreen.sub_logo_position[0], S.StartScreen.sub_logo_position[1]),
     ])
     #
     self.resume_button = button.Button('resume-button.png', S.StartScreen.resume_button_position[0], S.StartScreen.resume_button_position[1], name=B_RESUME)
     self.resume_button.visible = False
     #
     self.buttons = drawable.DrawableGroup([
         button.Button('play-button.png', S.StartScreen.play_button_position[0], S.StartScreen.play_button_position[1], name=B_START),
         self.resume_button,
         button.Button('rules-button.png', S.StartScreen.rules_button_position[0], S.StartScreen.rules_button_position[1], name=B_RULES),
         button.Button('cards-button.png', S.StartScreen.cards_button_position[0], S.StartScreen.cards_button_position[1], name=B_CARDS),
     ])
     # Buttons on the cards screen
     self.cards = card.getCollections('cards.txt')
     self.card_display_buttons = drawable.DrawableGroup()
     self.cards_buttons = slots.HorizontalItemSlots(*S.CardDisplay.button_slots)
     names = self.cards.keys()
     names.sort()
     self.show_cards = 'mark'
     for name in names:
         new_button = button.OnOffButton('%s-button.png' % name, name=name)
         self.cards_buttons.addItem(new_button)
         self.card_display_buttons.append(new_button)
         if name == self.show_cards:
             self.selected_button = new_button
             new_button.setState(True)
     #
     self.card_slot_1 = slots.HorizontalItemSlots(*S.CardDisplay.card_slot_1)
     self.card_slot_2 = slots.HorizontalItemSlots(*S.CardDisplay.card_slot_2)
     self.card_slots = drawable.DrawableGroup([
         self.card_slot_1, self.card_slot_2
     ])
     #
     self.back_button = button.Button(
         'back-button.png',
         S.CardDisplay.back_button_position[0], S.CardDisplay.back_button_position[1]
     )
     self.card_display_buttons.append(self.back_button)
     #
     self.credits_button = button.Button(
         'credits-button.png',
         S.StartScreen.credits_button_position[0], S.StartScreen.credits_button_position[1]
     )
     self.buttons.append(self.credits_button)
     self.credits_buttons = drawable.DrawableGroup([
         self.back_button,
     ])
     self.credits_details = sprite.Sprite('credits.png', S.Screen.width / 2, S.Screen.height / 2)
     #
     self.quit_button = button.Button(
         'quit-button.png',
         S.StartScreen.quit_button_position[0], S.StartScreen.quit_button_position[1]
     )
     self.buttons.append(self.quit_button)
     #
     self.next_button = button.Button('next-page-button.png', S.StartScreen.next_button_position[0], S.StartScreen.next_button_position[1], name=B_NEXT)
     self.previous_button = button.Button('previous-page-button.png', S.StartScreen.previous_button_position[0], S.StartScreen.previous_button_position[1], name=B_PREVIOUS)
     self.help_buttons = drawable.DrawableGroup([
         self.back_button,
         self.next_button,
         self.previous_button,
     ])
     self.help_text = sprite.Sprite('instructions-1.png', S.StartScreen.text_position[0], S.StartScreen.text_position[1])
     #
     self.display_slots = slots.HorizontalItemSlots(*S.StartScreen.display_slots)
     self.all_cards = self.cards.getAllCards()
     for slot in self.display_slots.slots:
         slot.addItem(random.choice(self.all_cards))
     #
     self.click = sound.Sounds.getSound(S.Sounds.click)
     self.version = text.Text(
         S.StartScreen.version_text_position[0], S.StartScreen.version_text_position[1],
         'V%s %s %s' % tuple(common.__version__.split('.')), S.VersionFont.font,
         S.VersionFont.colour
     )
     self.credit = text.Text(
         S.StartScreen.credit_text_position[0], S.StartScreen.credit_text_position[1],
         'A    pyweek   19   game   by   Paul   Paterson', S.CreditFont.font,
         S.CreditFont.colour
     )
     #
     self.background.append(self.version)
     self.background.append(self.credit)