public void default_game_board_moves_player_to_start_on_dice_6() { // on a default game board with 4 players the red player rolls a 6 int diceValue = 6; var result = _gameboard.CheckPossiblePlayerMoves(PlayerColors.red, diceValue); Assert.AreEqual(true, result.CanMove); Assert.AreEqual(true, result.AdditionalThrowGranted); // do the move and test _gameboard.Move(result.PossibleMoves[0], diceValue); Assert.AreEqual(true, nvp_RuleHelper.IsFieldOccupiedByOwnFigure(PlayerColors.red, _gameboard.playerFigures, 0)); }
// +++ event handler ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void OnPlayerMoveSected(int index) { _gameLogic.Move(_lastCalculatedMoveResult, index); // invoke event OnPlayerFigureMoved(); }
public void test_rules_h4_b0_s0_d_r6() { /** description * on a default game board with 4 players the red player rolls a 6 * the player figure with index 0 should be on local position 0 * and world postion 0 */ int diceValue = 6; var result = CheckRules("r6"); Assert.AreEqual(true, result.CanMove); Assert.AreEqual(true, result.AdditionalRollGranted); _gameboard.Move(result); var pf = CheckWorldPosition(0); Assert.AreEqual(0, pf.Index); Assert.AreEqual(PlayerColors.red, pf.Color); }