Exemplo n.º 1
0
        public void Test_GetMiddleLayerPointsFreeColumn()
        {
            YambTable.ResetInstance();
            _table = YambTable.GetInstance();

            int[] dices = { 5, 6, 6, 4, 6 };
            _table.InputValue(ColumnTypes.FREE, LayerTypes.MIDDLE, FieldTypes.MAX, dices, DiceThrow.FIRST);

            dices[0] = 1;
            dices[1] = 2;
            dices[2] = 1;
            dices[3] = 3;
            dices[4] = 1;
            _table.InputValue(ColumnTypes.FREE, LayerTypes.MIDDLE, FieldTypes.MIN, dices, DiceThrow.FIRST);

            Assert.AreEqual(0, _table.GetLayerPointsByColumn(ColumnTypes.FREE, LayerTypes.MIDDLE));

            dices[0] = 1;
            dices[1] = 1;
            dices[2] = 6;
            dices[3] = 1;
            dices[4] = 1;
            _table.InputValue(ColumnTypes.FREE, LayerTypes.FIRST, FieldTypes.ONE, dices, DiceThrow.FIRST);

            Assert.AreEqual(76, _table.GetLayerPointsByColumn(ColumnTypes.FREE, LayerTypes.MIDDLE));
        }
Exemplo n.º 2
0
        public void Test_FirstLayerBonusPoints()
        {
            YambTable.ResetInstance();
            _table = YambTable.GetInstance();

            int[] dices = { 1, 6, 1, 4, 1 };
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.ONE, dices, DiceThrow.FIRST);

            dices[0] = 2;
            dices[1] = 2;
            dices[2] = 2;
            dices[3] = 1;
            dices[4] = 3;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.TWO, dices, DiceThrow.FIRST);

            dices[0] = 3;
            dices[1] = 3;
            dices[2] = 6;
            dices[3] = 5;
            dices[4] = 3;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.THREE, dices, DiceThrow.SECOND);

            dices[0] = 4;
            dices[1] = 4;
            dices[2] = 3;
            dices[3] = 4;
            dices[4] = 4;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.FOUR, dices, DiceThrow.FIRST);

            dices[0] = 5;
            dices[1] = 5;
            dices[2] = 3;
            dices[3] = 5;
            dices[4] = 4;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.FIVE, dices, DiceThrow.FIRST);

            Assert.AreEqual(49, _table.GetLayerPointsByColumn(ColumnTypes.DOWN, LayerTypes.FIRST));

            dices[0] = 6;
            dices[1] = 5;
            dices[2] = 6;
            dices[3] = 5;
            dices[4] = 4;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.SIX, dices, DiceThrow.FIRST);

            Assert.AreEqual(91, _table.GetLayerPointsByColumn(ColumnTypes.DOWN, LayerTypes.FIRST));
        }
Exemplo n.º 3
0
        public void Test_InputValueInSkalaFreeColumn()
        {
            YambTable.ResetInstance();
            _table = YambTable.GetInstance();

            int[] dices = { 2, 1, 3, 5, 4 };
            _table.InputValue(ColumnTypes.FREE, LayerTypes.LAST, FieldTypes.SKALA, dices, DiceThrow.FIRST);

            Assert.AreEqual(35, _table.GetFieldValue(ColumnTypes.FREE, LayerTypes.LAST, FieldTypes.SKALA));
        }
Exemplo n.º 4
0
        public void Test_GetTotalPoints()
        {
            YambTable.ResetInstance();
            _table = YambTable.GetInstance();

            int[] dices = { 5, 6, 6, 4, 6 };
            _table.InputValue(ColumnTypes.FREE, LayerTypes.FIRST, FieldTypes.SIX, dices, DiceThrow.FIRST);

            dices[0] = 4;
            dices[1] = 1;
            dices[2] = 6;
            dices[3] = 1;
            dices[4] = 3;
            _table.InputValue(ColumnTypes.DOWN, LayerTypes.FIRST, FieldTypes.ONE, dices, DiceThrow.FIRST);

            dices[0] = 5;
            dices[1] = 5;
            dices[2] = 6;
            dices[3] = 5;
            dices[4] = 5;
            _table.InputValue(ColumnTypes.ANNOUNCEMENT, LayerTypes.LAST, FieldTypes.POKER, dices, DiceThrow.SECOND);
            _table.InputValue(ColumnTypes.ANNOUNCEMENT, LayerTypes.LAST, FieldTypes.POKER, dices, DiceThrow.THIRD);

            dices[0] = 4;
            dices[1] = 4;
            dices[2] = 4;
            dices[3] = 4;
            dices[4] = 4;
            _table.InputValue(ColumnTypes.UP, LayerTypes.LAST, FieldTypes.YAMB, dices, DiceThrow.FIRST);

            Assert.AreEqual(150, _table.GetTotalPoints());
        }