public Philosopher(int index, Fork leftFork, Fork rightFork, Seat seat) { this.index = index; actionTimeGenerator = new Random(); this.leftFork = leftFork; this.rightFork = rightFork; this.seat = seat; }
private Fork[] GetForks(int forksCount) { Fork[] forks = new Fork[forksCount]; for (int i = 0; i < forksCount; i++) { forks[i] = new Fork(i); } return(forks); }