public PlayMessageTest() { _player = new Player(new Die(), 100) { CurrentPosition = 50, Name = "Player1" }; _playMessage = new PlayMessage(); }
public PlayTest() { var game = new Game(); var playMessage = new PlayMessage(); _play = new Play(game, playMessage); _playerMock = new Mock <IPlayer>(); _playerMock.Setup(x => x.CurrentPosition).Returns(50); _playerMock.Setup(x => x.Move()).Callback(() => _playerMock.Setup(x => x.CurrentPosition).Returns(53)); }
private void ReceivePlayMessage(PlayMessage msg) { switch (msg.BellSound) { case BellSound.Burmese: BurmeseGongMediaElement.Play(); break; case BellSound.Cymbals: CymbalsGongMediaElement.Play(); break; case BellSound.Flute: FluteGongMediaElement.Play(); break; case BellSound.Perfect: PerfectGongMediaElement.Play(); break; default: throw new ArgumentException("BellSound not found.", nameof(msg)); } }
public void Handle(PlayMessage message) { }
public void Handle(PlayMessage message) { Play(message.Options); }
private void OnReceive(PlayMessage input) { ColorConsole.WriteYellow($"Received play message: [{input.MovieTitle}] [{input.UserId}]"); }