public Thief(int i, Lockpicks picks) { //initialize variables this.lockpicks = picks; this._index = i; //start the heist new Thread(new ThreadStart(Heist)).Start(); }
static void Main(string[] args) { //Initialize the lockpicks Lockpicks lockpicks = new Lockpicks(); //start the Thief threads new Thief(0, lockpicks); new Thief(1, lockpicks); new Thief(2, lockpicks); new Thief(3, lockpicks); new Thief(4, lockpicks); }