Exemplo n.º 1
0
        public void EachPieceDataTakenIsDifferent()
        {
            List <PieceData> pieceDataList = CreatePieceDataList(3);
            PieceDataSorter  pieceSorter   = CreatePieceDataSorter(pieceDataList);

            PieceData firstPieceData  = pieceSorter.GetRandomPieceData();
            PieceData secondPieceData = pieceSorter.GetRandomPieceData();

            Assert.AreNotEqual(firstPieceData, secondPieceData);
        }
        public GameObject Create()
        {
            GameObject pieceObject = CreateGameObject();

            ConstructPiece(pieceSorter.GetRandomPieceData(), pieceObject);

            return(pieceObject);
        }
Exemplo n.º 3
0
        public void EachTimeDataIsRetrievedItIsRemovedFromList()
        {
            List <PieceData> pieceDataList = CreatePieceDataList(3);
            PieceDataSorter  pieceSorter   = CreatePieceDataSorter(pieceDataList);

            PieceData retrievedPieceData = pieceSorter.GetRandomPieceData();

            Assert.IsFalse(pieceDataList.Contains(retrievedPieceData));
        }
Exemplo n.º 4
0
        public void PieceIsCorrectlyRetrieved()
        {
            List <PieceData> pieceDataList = CreatePieceDataList(3);
            PieceDataSorter  pieceSorter   = CreatePieceDataSorter(pieceDataList);

            PieceData pieceData = pieceSorter.GetRandomPieceData();

            Assert.IsNotNull(pieceData);
        }
Exemplo n.º 5
0
 public PieceData GetRandomPieceData()
 {
     return(pieceDataSorter.GetRandomPieceData());
 }