Exemple #1
0
 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));
        }
Exemple #3
0
        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));
            }
        }
Exemple #4
0
 public void Handle(PlayMessage message)
 {
 }
 public void Handle(PlayMessage message)
 {
     Play(message.Options);
 }
 public void Handle(PlayMessage message)
 {
 }
Exemple #7
0
 private void OnReceive(PlayMessage input)
 {
     ColorConsole.WriteYellow($"Received play message: [{input.MovieTitle}] [{input.UserId}]");
 }
Exemple #8
0
 public void Handle(PlayMessage message)
 {
     Play(message.Options);
 }