Exemplo n.º 1
0
    // Remove the last connected board space
    public void RemoveLastConnected()
    {
        ConnectionLine line = connectionLines.GetLast();

        line.Remove();
        connectedSpaces.RemoveAt(connectedSpaces.Count - 1);
    }
Exemplo n.º 2
0
    void OnTouchEnd()
    {
        // score the dots in our dot list
        if (dotSquare.SquareExists(currentDotLink))
        {
            dotSquare.Score();
        }
        else
        {
            List <BoardSpace> connectionSpaces = currentDotLink.GetConnectionSpaces();
            if (connectionSpaces.Count > 1)
            {
                for (int i = 0; i < connectionSpaces.Count; i++)
                {
                    connectionSpaces[i].SetEmpty(true);
                    connectionSpaces[i].GetCurrentDot().Score();
                }
            }
        }

        dotSquare.Reset();
        currentDotLink.Reset();
        touchLine.Remove();

        // drop the dots
        board.DropDots();
    }