Beispiel #1
0
        public void shouldGetOpponentBoatLocation()
        {
            BoatLocation location = new BoatLocation("A", "1", Orientation.X);

            Assert.Equal(location.GetRow(), player.GetOpponentBoatLocation().GetRow());
            Assert.Equal(location.GetColumn(), player.GetOpponentBoatLocation().GetColumn());
            Assert.Equal(location.GetOrientation(), player.GetOpponentBoatLocation().GetOrientation());
        }
Beispiel #2
0
        public void shouldRotateBoat()
        {
            BoatLocation location = new BoatLocation("A", "1", Orientation.Y);

            player.RotateBoat();
            Assert.Equal(location.GetRow(), player.GetBoatLocation().GetRow());
            Assert.Equal(location.GetColumn(), player.GetBoatLocation().GetColumn());
            Assert.Equal(location.GetOrientation(), player.GetBoatLocation().GetOrientation());
        }
Beispiel #3
0
        public void shouldMoveBoatUp()
        {
            BoatLocation location = new BoatLocation("A", "8", Orientation.X);

            player.MoveBoatUp();
            Assert.Equal(location.GetRow(), player.GetBoatLocation().GetRow());
            Assert.Equal(location.GetColumn(), player.GetBoatLocation().GetColumn());
            Assert.Equal(location.GetOrientation(), player.GetBoatLocation().GetOrientation());
        }