Your task is to improve (or implement...) test suite
infrastructure and test suites for the previous
assignment.
Implementing the rules of Parcheesi is subtle. Below are
some situations that you should turn into test cases for
your checker. [5pts]
Add test cases based on your own experience implementing
the game and the particular details of your representation
of a Parcheesi board. [5pts]
Basic tests
- moving a piece
- moving into home row
- moving on home row
- moving home (with bonus)
- cannot move if no piece present on the square
Entering
- enter with 1,4
- enter with 2,3
- cannot enter with a non-5 roll
- enter two pieces with double 5s
Bopping
- bopping a piece and get bonus
- enter a piece and bop an opponenet on the safety
- bopping on a safety (otherwise) is illegal
- bop two pieces and move bonuses
- cannot bop twice and then move a blockade together by 20
- cannot enter home twice and then move a blockade together by 10
Blockades
- cannot enter with a blockade on the entry point
- can form a blockade, but cannot add a third piece
- cannot move directly onto an opponent's blockade
- cannot pass a blockade of an opponents
- cannot pass one's own blockade
- cannot pass a blockade in the home row
- can break a blockade
- cannot move a blockade together with two fours
- cannot move a blocakde with two fours and two threes,
even if moving 4, 3 with one piece and 3, 4 with the other
- with a blockade and one piece in front of the blocakde
and a roll of 1,2, it is possible to form a new blockade
- cannot enter if there is a blockade on the entry
square
Exit Row
- can move from the main ring to the exit row
- can move from the main ring directly home (without
landing on the home row)
Complete Move
- cannot ignore die roll
- cannot move either piece, due to blocakde
- can only take the first die, due to blockade
- can only take the second die, due to blockade
- bop, but don't take the 20
- move home, but don't take the 10
- can only move one die, since moving both
would mean moving a blockade together
Doubles penalty
Test various configurations of boards that the frontmost
piece is moved back, including the situation where no
pieces are in.
|