Пример #1
0
    public void LinkTile(GameTile nextTile)
    {
        PreviousTile = (_tileStack.Count > 0) ? _tileStack.Peek() : null;

        _tileStack.Push(nextTile);
        nextTile.FillTile(_goalTotal, PreviousTile);

        if (nextTile.GetType() == typeof(NumberTile))
        {
            PathTotal = (int)_stf.Eval(_equationGenerator.GetEquationString(this, true));
            _goalTotal.CheckComplete();
        }

        pathUpdatedEvent.Invoke();
    }