Пример #1
0
        private void WaitingTilesShouldBe(string tilesString)
        {
            var waitingTiles  = _hand.GetWaitingTiles();
            var expectedTiles = TileFactory.CreateTiles(tilesString);

            waitingTiles.Should().BeEquivalentTo(expectedTiles);
        }
Пример #2
0
 private void GivenTiles(string tiles)
 {
     _tiles = TileFactory.CreateTiles(tiles);
 }
Пример #3
0
 public void D1114_should_return_collection_with_D14()
 {
     GivenTiles("D1,D1,D1,D4");
     ShouldBeEquivalentToCollection(new[] { TileFactory.CreateTiles("D1,D4") });
 }
Пример #4
0
 public Hand(string tilesString)
 {
     _tiles = TileFactory.CreateTiles(tilesString);
 }
Пример #5
0
 private void CalculateWaitingTiles(string tiles)
 {
     _possibleWaitingTiles = CalculatePossibleWaitingTiles(TileFactory.CreateTiles(tiles));
 }
Пример #6
0
 public void possible_waiting_tiles_should_exclude_4_tiles()
 {
     CalculateWaitingTiles("D3,D3,D3,D3");
     _possibleWaitingTiles.Should().NotContain(TileFactory.CreateTiles("D3"));
 }
Пример #7
0
 public void possible_waiting_tiles_should_include_sibling()
 {
     CalculateWaitingTiles("D2,D3");
     _possibleWaitingTiles.Should().Contain(TileFactory.CreateTiles("D1,D4"));
 }
Пример #8
0
 public void tiles_themselves_are_also_possible_waiting_tiles()
 {
     CalculateWaitingTiles("D1,D5,D9");
     _possibleWaitingTiles.Should().Contain(TileFactory.CreateTiles("D1,D5,D9"));
 }