public void TestFieldValuesOfShipLengthOne() { AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_SINGLE }, BimaruValues.FieldValuesOfShip(Direction.RIGHT, 1)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_SINGLE }, BimaruValues.FieldValuesOfShip(Direction.LEFT, 1)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_SINGLE }, BimaruValues.FieldValuesOfShip(Direction.UP, 1)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_SINGLE }, BimaruValues.FieldValuesOfShip(Direction.DOWN, 1)); }
public void TestFieldValuesOfShipLengthTwo() { AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_CONT_RIGHT, BimaruValue.SHIP_CONT_LEFT }, BimaruValues.FieldValuesOfShip(Direction.RIGHT, 2)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_CONT_LEFT, BimaruValue.SHIP_CONT_RIGHT }, BimaruValues.FieldValuesOfShip(Direction.LEFT, 2)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_CONT_UP, BimaruValue.SHIP_CONT_DOWN }, BimaruValues.FieldValuesOfShip(Direction.UP, 2)); AssertEqualFieldValues( new List <BimaruValue>() { BimaruValue.SHIP_CONT_DOWN, BimaruValue.SHIP_CONT_UP }, BimaruValues.FieldValuesOfShip(Direction.DOWN, 2)); }
public void TestFieldValuesOfShipLengthZero() { Assert.ThrowsException <ArgumentOutOfRangeException>( () => BimaruValues.FieldValuesOfShip(Direction.RIGHT, 0).GetEnumerator().MoveNext()); }