song_match.effect.effects

Package containing various game effects.

song_match.effect.effects.correct_sequence

Inheritance diagram of song_match.effect.effects.correct_sequence
class song_match.effect.effects.correct_sequence.CorrectSequenceEffect(song_robot: song_match.song_robot.SongRobot)[source]

Bases: song_match.effect.effect.Effect

Played when either a player or Cozmo matches a sequence of notes correctly.

play(is_sequence_long: bool = False, is_player: bool = True) → None[source]

Play the correct sequence effect.

Parameters:
  • is_sequence_long – Whether the sequence the player matched was long.
  • is_player – Whether the player or Cozmo played the correct sequence.
Returns:

None

song_match.effect.effects.game_over

Inheritance diagram of song_match.effect.effects.game_over
class song_match.effect.effects.game_over.GameOverEffect(song_robot: song_match.song_robot.SongRobot)[source]

Bases: song_match.effect.effect.Effect

play(winners: List[song_match.player.Player], did_cozmo_win: bool = True) → cozmo.anim.AnimationTrigger[source]

Play the game over effect.

  • Play collect-point.wav
  • Animate Cozmo with MajorFail or DanceMambo depending upon is_cozmo.
  • Flash the victory sequence.
Parameters:
  • winners – A list of the players that won the game.
  • did_cozmo_win – Whether or not Cozmo shared the glory of victory.
Returns:

None

song_match.effect.effects.round_transition

Inheritance diagram of song_match.effect.effects.round_transition
class song_match.effect.effects.round_transition.RoundTransitionEffect(song_robot: song_match.song_robot.SongRobot)[source]

Bases: song_match.effect.effect.Effect

Played when transitioning between rounds of the game.

play() → None[source]

Play the round transition effect.

  • Play level-complete.wav.
  • Start the light chaser effect on each cube.
Returns:None

song_match.effect.effects.wrong_note

Inheritance diagram of song_match.effect.effects.wrong_note
class song_match.effect.effects.wrong_note.WrongNoteEffect(song_robot: song_match.song_robot.SongRobot)[source]

Bases: song_match.effect.effect.Effect

Played when either a player or Cozmo plays the wrong note.

play(cube_id: int, is_player: bool = True) → None[source]

Play the wrong note effect.

Parameters:
  • cube_idcube_id
  • is_player – Whether the player or Cozmo played the wrong note.
Returns:

None