public IRockPaperScissorsBot DetermineWinner(BotMove player1, BotMove player2)
        {
            var winningMove = DetermineWinningMove(player1.Move, player2.Move);

            if (winningMove == null)
                return null;

            return player1.Move == winningMove ? player1.Player : player2.Player;
        }
        public void DynamiteTiesDynamiteTest()
        {
            // Arrange
            var me = new MyBot();
            var randomBot = new RandomBot();

            var myMove = new BotMove { Player = me, Move = Moves.Dynamite };
            var theirMove = new BotMove { Player = randomBot, Move = Moves.Dynamite };

            // Act
            var winner1 = new GameEmulator().DetermineWinner(myMove, theirMove);
            var winner2 = new GameEmulator().DetermineWinner(theirMove, myMove);

            // Assert
            Assert.IsNull(winner1);
            Assert.IsNull(winner2);
        }
        public void DynamiteBeatsScissorsTest()
        {
            // Arrange
            var me = new MyBot();
            var randomBot = new RandomBot();

            var myMove = new BotMove { Player = me, Move = Moves.Dynamite };
            var theirMove = new BotMove { Player = randomBot, Move = Moves.Scissors };

            // Act
            var winner1 = new GameEmulator().DetermineWinner(myMove, theirMove);
            var winner2 = new GameEmulator().DetermineWinner(theirMove, myMove);

            // Assert
            Assert.AreSame(me, winner1);
            Assert.AreSame(me, winner2);
        }
        public void PaperBeatsRockTest()
        {
            // Arrange
            var me = new MyBot();
            var randomBot = new RandomBot();

            var myMove = new BotMove { Player = me, Move = Moves.Paper };
            var theirMove = new BotMove { Player = randomBot, Move = Moves.Rock };

            // Act
            var winner1 = new GameEmulator().DetermineWinner(myMove, theirMove);
            var winner2 = new GameEmulator().DetermineWinner(theirMove, myMove);

            // Assert
            Assert.AreSame(me, winner1);
            Assert.AreSame(me, winner2);
        }