C# Addendum
Let's see what it takes to convert this script from Unity JavaScript to C#. The complete C# script is shown in the following code snippet:
using UnityEngine; using System.Collections; using System.Collections.Generic; public class GameScriptCSharp : MonoBehaviour { private int cols = 4; // the number of columns in the card grid private int rows = 4; // the number of rows in the card grid private int totalCards = 16; private int matchesNeededToWin; private int matchesMade = 0; // At the outset, the player has not made any matches private int cardW = 100; // Each card's width and height is 100 pixels private int cardH = 100; private List<Card> aCards; // We'll store all the cards we create in this array private Card[,] aGrid; // This 2d array will keep track of the shuffled, dealt cards private List<Card> aCardsFlipped; // This generic array list will store the two cards that the player flips over private bool playerCanClick; // We'll use this...