public void R11_the_players_alternate_in_sowing_the_stones_in_a_pit_of_their_choice_on_their_side_of_the_board_North_owns_pits_a_f_and_south_pits_A_F() { _initialBoard.CanSow("B").Should().BeTrue(); _initialBoard.CanSow("b").Should().BeFalse(); _initialBoard.Sow("C"); _initialBoard.CanSow("B").Should().BeFalse(); _initialBoard.CanSow("b").Should().BeTrue(); _initialBoard.Invoking(x => x.Sow("B")).Should().Throw <ArgumentException>().WithMessage("South already moved, a player cannot make two moves in a row."); }
public void R20_a_player_must_leave_the_opponent_with_a_legal_move_at_the_start_of_their_turn_if_it_is_possible_to_do_so() { var board = new AwariBoard( B: 4, F: 1, southAwari: 21, northAwari: 22); board.CanSow("B").Should().BeFalse(); board.CanSow("F").Should().BeTrue(); }
public void R12_a_pit_may_be_sown_if_it_contains_one_or_more_stones() { var board = new AwariBoard( f: 3, e: 3, d: 3, c: 3, b: 3, a: 3, A: 3, B: 0, C: 3, D: 3, E: 3, F: 3, southAwari: 6, northAwari: 9); board.CanSow("A").Should().BeTrue(); board.CanSow("B").Should().BeFalse(); board.CanSow("C").Should().BeTrue(); }
public void R18_Stones_may_not_be_sown_for_a_grand_slam_unless_no_other_move_is_possible() { var board = new AwariBoard( f: 0, e: 0, d: 2, c: 1, b: 2, a: 1, A: 2, B: 0, C: 0, D: 0, E: 0, F: 4, southAwari: 18, northAwari: 18); board.CanSow("A").Should().BeTrue(); board.CanSow("F").Should().BeFalse(); board = new AwariBoard( d: 2, c: 1, b: 2, a: 1, F: 4, southAwari: 20, northAwari: 18); board.CanSow("F").Should().BeTrue(); }