// Use this for initialization
    void Start()
    {
        score = GameObject.Find("CanvasScoreGUI").GetComponent<PlayersScoresGUI>();
        score.buttonRetry.onClick.AddListener(() => OnButtonPressed(1));
        score.buttonExit.onClick.AddListener(() => OnButtonPressed(2));
        score.HideEndPanel();
        score.turn = 1;
        score.ChangePlayersTurn();

        AdjustBoardSize();

        CreatePieces();

        ResetGame();
    }
    // Use this for initialization
    void Start()
    {
        score = GameObject.Find("CanvasScoreGUI").GetComponent<PlayersScoresGUI>();
        score.buttonRetry.onClick.AddListener(() => OnButtonPressed(1));
        score.buttonExit.onClick.AddListener(() => OnButtonPressed(2));
        score.HideEndPanel();
        score.turn = 0;

        cardsLeft = boardWidth * boardHeight;
        isBusy = false;

        touchCount = 0;

        GameObject go = Instantiate(Resources.Load(prefabPath) as GameObject);
        stepH = go.GetComponent<BoxCollider>().bounds.size.x + marginH;
        stepV = go.GetComponent<BoxCollider>().bounds.size.y + marginV;
        Destroy(go);

        CreateCardMatrix();
        ResetMatrix();

        AdjustCamera();

        removePoint[0] = Camera.main.ScreenToWorldPoint(score.textScores[0].gameObject.transform.position);
        removePoint[1] = Camera.main.ScreenToWorldPoint(score.textScores[1].gameObject.transform.position);
    }